diff --git a/src/components/Codesandbox.tsx b/src/components/Codesandbox.tsx index f8b35b3d..e470e0b1 100644 --- a/src/components/Codesandbox.tsx +++ b/src/components/Codesandbox.tsx @@ -13,6 +13,7 @@ export type CSB = { export default function Codesandbox({ id, data, + embed = false, tags: defaultTags, description: defaultDescription, title: defaultTitle, @@ -20,6 +21,7 @@ export default function Codesandbox({ }: { id: string data: CSB + embed: boolean tags?: string[] description?: string title?: string @@ -31,19 +33,30 @@ export default function Codesandbox({ return ( <> - - {data?.screenshot_url && ( - {title} - )} - + {embed ? ( + + ) : ( + + {data?.screenshot_url && ( + {title} + )} + + )} + {!hideTitle && ( <>
{title}