tweak: squiggle chart on link hover

This commit is contained in:
NunoSempere 2022-06-20 01:47:11 -04:00
parent a1c255b2d3
commit 265908d3c5
2 changed files with 45 additions and 51 deletions

View File

@ -24,21 +24,15 @@ const effectButtonStyle =
"bg-transparent m-2 hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded mt-5";
export function DynamicSquiggleChart({ link, stopShowing }) {
if (link == null) {
return "";
} else {
let usefulLink = {
source: link.source,
target: link.target,
squiggleString: link.squiggleString,
};
return link == null ? (
""
) : (
/*{
<div className="grid grid-cols-1 grid-rows-1 place-items-center">
</div>
}*/
return (
<div className="">
<textarea
value={JSON.stringify(usefulLink, null, 4)}
@ -55,13 +49,7 @@ export function DynamicSquiggleChart({ link, stopShowing }) {
showSummary={true}
showTypes={true}
/>
<button className={effectButtonStyle} onClick={() => stopShowing()}>
Hide chart
</button>
</div>
);
{
/*
{/*
SquiggleChart props:
squiggleString?: string;
sampleCount?: number;
@ -75,6 +63,12 @@ export function DynamicSquiggleChart({ link, stopShowing }) {
showSummary?: boolean;
showTypes?: boolean;
showControls?: boolean;
*/
*/}
<button className={effectButtonStyle} onClick={() => stopShowing()}>
Hide chart
</button>
</div>
);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB