DocSpace-client/web/ASC.Web.Components/example/stories/buttons/base/base.button.stories.js
Alexey Safronov bb7203ae8d web: components:
+ Added label to Button component
+ Changed README files
+ Added new Button with Loader and it's story
+ Simplified all.buttons.stories.js
+ Added nowrap to Button component
2019-06-06 12:16:14 +03:00

26 lines
867 B
JavaScript

import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, text, select } from '@storybook/addon-knobs/react';
import withReadme from 'storybook-readme/with-readme';
import Readme from './README.md';
import { Button } from 'asc-web-components';
import Section from '../../../.storybook/decorators/section';
const sizeOptions = ['base', 'middle', 'big', 'huge'];
storiesOf('Components|Buttons', module)
.addDecorator(withKnobs)
.addDecorator(withReadme(Readme))
.add('base', () => (
<Section>
<Button
size={select('size', sizeOptions, 'base')}
primary={boolean('primary', true)}
isDisabled={boolean('isDisabled', false)}
onClick={action('clicked')}
label={text('label', 'Base button')}
/>
</Section>
));