2019-08-09 13:10:24 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { storiesOf } from '@storybook/react';
|
|
|
|
import { text, boolean, withKnobs } from '@storybook/addon-knobs/react';
|
|
|
|
import { Label } from 'asc-web-components';
|
|
|
|
import Section from '../../../.storybook/decorators/section';
|
|
|
|
import withReadme from 'storybook-readme/with-readme';
|
|
|
|
import Readme from './README.md';
|
|
|
|
|
|
|
|
storiesOf('Components|Label', module)
|
|
|
|
.addDecorator(withKnobs)
|
|
|
|
.addDecorator(withReadme(Readme))
|
|
|
|
.add('base', () => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Section>
|
|
|
|
<Label
|
|
|
|
isRequired={boolean('isRequired', false)}
|
|
|
|
error={boolean('error', false)}
|
2019-08-13 08:39:16 +00:00
|
|
|
isInline={boolean('isInline', false)}
|
2019-08-09 13:10:24 +00:00
|
|
|
title={text('title', 'Fill the first name field')}
|
|
|
|
truncate={boolean('truncate', false)}
|
|
|
|
htmlFor={text('htmlFor')}
|
2019-08-13 08:39:16 +00:00
|
|
|
text={text('text', 'First name:')}
|
|
|
|
display={text('display')}
|
|
|
|
/>
|
2019-08-09 13:10:24 +00:00
|
|
|
</Section>
|
|
|
|
)
|
|
|
|
});
|