0

I am using Storybook 7 and want to add some tutorials to my storybook. In these tutorials I would like to show some code snippets as examples.

But when I add code like that I get various linter errors (e.g. XML element expected). Despite the errors this solution would work, but the code is very bad formatted.

```javascript
export const FullWidth = {
  args: {
    modifier: [FigureContainerModifier.FULL_WIDTH],
  },
}
```

The code above is then formatted like this: enter image description here

Is there another way to do this? The prettiest way would not be to copy-paste the code but import it somehow and then display it. But I don't know if this is possible.

Thanks for any help!

whytheq
  • 34,466
  • 65
  • 172
  • 267

0 Answers0