1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/src/rest/components/RestPreviewNotice.tsx
Kevin Heis ec4d85c7d3 Migrate Callout React component to Alert (#47226)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2024-01-02 21:38:14 +00:00

21 lines
499 B
TypeScript

import { Alert } from 'src/frame/components/ui/Alert'
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) => (
<Alert type="NOTE" html={preview} key={JSON.stringify(preview) + index} />
))}
</>
)
}