- 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
div
with thecustom-component
class. 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
.
<> <Note variant="info">Example of an info note</Note> <Note variant="warning">Example of a warning note</Note> </>
Will render:
Example of an info note
Example of a warning note