0

I created a story using MDX. I want to demonstrate my inhouse-styles for buttons.

The story contains the following:

<a class="btn btn-primary">
Primary Button
</a>

When rendered, story book shows

<a class="sbdocs sbdocs-a btn btn-primary css-19nbuh3" target="_top">
Primary Button
<a>

As a result, my button does not display with the correct css.

How do I prevent storybook MDX from changing markup?

Nowhere Man
  • 19,170
  • 9
  • 17
  • 42
Kevin Gill
  • 407
  • 1
  • 5
  • 14

1 Answers1

0

Put your markup inside of <Preview> tags:

<Preview>
  <a class="btn btn-primary">
  Primary Button
  </a>
</Preview>
Tschareck
  • 4,071
  • 9
  • 47
  • 74