1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Files
docs/components/rest/RestPreviewNotice.tsx
2023-02-27 19:07:56 +00:00

23 lines
608 B
TypeScript

type Props = {
slug: string
previews: Array<string>
heading: string
}
export function RestPreviewNotice({ slug, previews, heading }: Props) {
return (
<>
<h3 className="h4" id={`${slug}-preview-notices`}>
<a href={`#${slug}-preview-notices`}>{heading}</a>
</h3>
{previews.map((preview, index) => (
<div
className="extended-markdown note border rounded-1 mb-6 p-3 color-border-accent-emphasis color-bg-accent f5"
dangerouslySetInnerHTML={{ __html: preview }}
key={JSON.stringify(preview) + index}
/>
))}
</>
)
}