import { Meta, Story, Canvas } from '@storybook/addon-docs';
import { DocButtonComponent } from './doc-button/doc-button.component';

<Meta title="Addons/Docs/MDX with Template" component={DocButtonComponent} />

# DocButton

With `MDX` we can define a story for a component right in the middle of the documentation

export const Template = (args) => ({ props: args });

<Canvas withToolbar>
  <Story
    name="Normal"
    args={{
      label: 'Normal',
    }}
  >
    {Template.bind({})}
  </Story>
</Canvas>

Here's a story that disables the button using args:

<Canvas>
  <Story
    name="Disabled"
    args={{
      label: 'Disabled',
      isDisabled: true,
    }}
  >
    {Template.bind({})}
  </Story>
</Canvas>
