- Import relevant components from
@primer/doctocat-nextjs:
import {Note} from '@primer/doctocat-nextjs'- Use the components in your Markdown file, but ensure that you wrap the component in a
divwith thecustom-componentclass. This will ensure that article formatting isn’t applied to the custom component.
<Note>Example of a note</Note>
Will render:
Example of a note
Variants
Use the variant option to change the style of the note. The default variant is info.
<Stack direction="vertical"> <Note variant="info">Example of an info note</Note> <Note variant="warning">Example of a warning note</Note> </Stack>
Will render:
Example of an info note
Example of a warning note