({ link, className, children }: PreviewBoxProps)
| 8 | }; |
| 9 | |
| 10 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected