Open this example in the interactive library
Live preview
Source code
// components/FigureWithCustomContent.tsx
import type { ReactNode } from "react";
export default function FigureWithCustomContent({
heading = "Workshop",
children = "Details are available at the front desk.",
}: { heading?: string; children?: ReactNode } = {}) {
return (
<figure>
{children}
<figcaption>{heading}</figcaption>
</figure>
);
}
