nextra icon indicating copy to clipboard operation
nextra copied to clipboard

Extracting MDX to components

Open pawelkrystkiewicz opened this issue 2 years ago • 0 comments

I want to extract repeating segments in my MDX to components. How should I go about it for extra to detect and compile MDX?

Example 1

## Sizes

This component supports `size` prop with values `sm`, `md`, `lg`.

This is my workaround for having text marked as code but it only semi-works as it doesn't have all of the nextra classes for code tag

const multipleWarning = (
  <>
    If multiple is set, the type of <code>value</code> will be <code>T[]</code>
  </>
)

pawelkrystkiewicz avatar Dec 13 '22 15:12 pawelkrystkiewicz