import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';

# HTML MDX Demo

Here's a few sample HTML stories in MDX. Enjoy!

<Meta title="Demo" />

<Canvas withToolbar>
  <Story name="heading">{() => '<h1>Hello World</h1>'}</Story>
</Canvas>

<Story name="button">
  {() => {
    const btn = document.createElement('button');
    btn.type = 'button';
    btn.innerText = 'Hello Button';
    btn.addEventListener('click', (e) => console.log(e));
    return btn;
  }}
</Story>
