open-consul/ui/packages/consul-ui/app/components/notice
John Cowen 17333e90ce
ui: Storybook Install (#9049)
* ui: Install storybook into the main project

* Add a basic story for a notice

* Remove empty dependencies
2020-11-03 14:09:39 +00:00
..
README.stories.mdx ui: Storybook Install (#9049) 2020-11-03 14:09:39 +00:00
index.hbs ui: Upgrade the rest of the UI to use the new Notice component (#9035) 2020-10-26 16:51:53 +00:00
index.scss ui: Upgrade the rest of the UI to use the new Notice component (#9035) 2020-10-26 16:51:53 +00:00
layout.scss ui: Upgrade the rest of the UI to use the new Notice component (#9035) 2020-10-26 16:51:53 +00:00
skin.scss ui: Upgrade the rest of the UI to use the new Notice component (#9035) 2020-10-26 16:51:53 +00:00

README.stories.mdx

import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
import { hbs } from 'ember-cli-htmlbars';
import { select } from '@storybook/addon-knobs';

<Meta title="Components/Notice" component="Notice" />

# Notice

<Canvas>
  <Story name="Basic">{{
    template: hbs`<Notice
        @type={{type}}
      as |notice|>
        <notice.Header>
          <h3>Header</h3>
        </notice.Header>
        <notice.Body>
          <p>
            Body
          </p>
        </notice.Body>
        <notice.Footer>
          <p>
            Footer
          </p>
        </notice.Footer>
      </Notice>`,
    context: {
      type: select('type', {
          'success': 'success',
          'warning': 'warning',
          'info': 'info',
          'highlight': 'highlight',
        },
        'success'
      ),
    }
  }}
  </Story>
</Canvas>