fbredius/storybook

View on GitHub
examples/angular-cli/src/stories/addons/docs/simple.stories.mdx

Summary

Maintainability
Test Coverage
import { Story, Meta, ArgsTable, Source } from '@storybook/addon-docs';
import { Button } from '@storybook/angular/demo';
import { action } from '@storybook/addon-actions';

<Meta title="Addons/Docs/SimpleButton" component={Button} />

# Simple Button

<Story
  name="with text"
  args={{ text: 'Hello 👋' }}
  argTypes={{
    text: {
      name: 'text',
      type: { name: 'string' },
      description: 'Button content text',
      control: 'text',
    },
  }}
>
  {(args) => ({
    props: {
      text: args.text,
      onClick: action('clicked'),
    },
  })}
</Story>

<Source story="with text" />

<ArgsTable story="with text" />