mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
* Add Button example * Add semicolon behind import * Add Image example * Add Form examples * Add Typography examples
35 lines
647 B
JavaScript
35 lines
647 B
JavaScript
import React from 'react';
|
|
import { storiesOf } from '@kadira/storybook';
|
|
|
|
import { checkA11y } from './../../../src';
|
|
|
|
import Button from './component';
|
|
|
|
import Faker from 'faker';
|
|
|
|
const text = Faker.lorem.words();
|
|
|
|
storiesOf('<Button />', module)
|
|
.addDecorator(checkA11y)
|
|
.add('Default', () => (
|
|
<Button />
|
|
))
|
|
.add('Content', () => (
|
|
<Button content={text} />
|
|
))
|
|
.add('Label', () => (
|
|
<Button label={text} />
|
|
))
|
|
.add('Disabled', () => (
|
|
<Button
|
|
disabled
|
|
content={text}
|
|
/>
|
|
))
|
|
.add('Invalid contrast', () => (
|
|
<Button
|
|
contrast="wrong"
|
|
content={Faker.lorem.words()}
|
|
/>
|
|
));
|