1
0
mirror of synced 2026-01-06 06:02:35 -05:00
Files
docs/components/rest/RestOperationHeading.tsx
Grace Park e087622e1f REST Docs: update H3 to H2 operation heading (#27242)
* update H3 to H2 operation heading

* update rest test to h2
2022-04-27 17:22:21 +00:00

22 lines
447 B
TypeScript

import { LinkIcon } from '@primer/octicons-react'
type Props = {
slug: string
title: string
descriptionHTML: string
}
export function RestOperationHeading({ slug, title, descriptionHTML }: Props) {
return (
<>
<h2 id={slug}>
<a href={`#${slug}`}>
<LinkIcon size={16} className="m-1" />
</a>
{title}
</h2>
<div dangerouslySetInnerHTML={{ __html: descriptionHTML }} />
</>
)
}