MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / PreviewBox

Function PreviewBox

app/components/Preview/PreviewBox.tsx:10–29  ·  view source on GitHub ↗
({ link, className, children }: PreviewBoxProps)

Source from the content-addressed store, hash-verified

8};
9
10export function PreviewBox({ link, className, children }: PreviewBoxProps) {
11 const onClick = useCallback(() => {
12 if (!link) return;
13 window.open(link, "_blank");
14 }, [link]);
15
16 return (
17 <div className={className}>
18 <Title className="text-slate-700 transition dark:text-slate-400 mb-2">
19 Preview
20 </Title>
21 <div
22 onClick={onClick}
23 className="block rounded-sm p-2 text-slate-700 bg-slate-100 transition dark:text-slate-300 dark:bg-white dark:bg-opacity-5 hover:cursor-pointer"
24 >
25 <div>{children}</div>
26 </div>
27 </div>
28 );
29}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected