Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove readme from stories (#65)
- Loading branch information
Showing
10 changed files
with
83 additions
and
241 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
packages/big-design/src/components/ProgressCircle/README.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,40 @@ | ||
import { ProgressBar } from '@bigcommerce/big-design'; | ||
import { number } from '@storybook/addon-knobs'; | ||
import { Box, H1, H2, H3, Panel, ProgressBar } from '@bigcommerce/big-design'; | ||
import { storiesOf } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import ProgressBarReadme from '../../big-design/src/components/ProgressBar/README.md'; | ||
import { CodePreview, PropTable } from '../components'; | ||
|
||
const percentKnob = { | ||
name: 'percentage', | ||
value: 50, | ||
options: { | ||
range: true, | ||
min: 0, | ||
max: 100, | ||
step: 1, | ||
}, | ||
}; | ||
storiesOf('ProgressBar', module).add('Overview', () => ( | ||
<Panel> | ||
<H1>ProgressBar</H1> | ||
<H2>Examples</H2> | ||
<H3 marginTop="xLarge">Determinant</H3> | ||
<CodePreview> | ||
<Box marginVertical="large"> | ||
<ProgressBar percent={50} /> | ||
</Box> | ||
</CodePreview> | ||
<p> | ||
Determinant Progress represents a known amount of time or completeness for a task. A <code>percent</code> prop | ||
needs to be passed to render a determinate progress. | ||
</p> | ||
|
||
storiesOf('ProgressBar', module) | ||
.addParameters({ | ||
readme: { | ||
content: ProgressBarReadme, | ||
}, | ||
}) | ||
.add('Determinant', () => <ProgressBar percent={number(percentKnob.name, percentKnob.value, percentKnob.options)} />) | ||
.add('Indeterminant', () => <ProgressBar />); | ||
<H3 marginTop="xLarge">Indeterminant</H3> | ||
<CodePreview> | ||
<Box marginVertical="large"> | ||
<ProgressBar /> | ||
</Box> | ||
</CodePreview> | ||
<p> | ||
Indeterminant Progress represents an unknown amount of time for a task to complete. Component will render an | ||
indeterminant progress when missing a <code>percent</code> prop. | ||
</p> | ||
|
||
<H2 marginTop="xxxLarge">Properties & Methods</H2> | ||
<PropTable> | ||
<PropTable.Prop name="percent" types="number"> | ||
Sets the fill length from 0 to 100. | ||
</PropTable.Prop> | ||
</PropTable> | ||
</Panel> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,42 @@ | ||
import { ProgressCircle } from '@bigcommerce/big-design'; | ||
import { boolean, number, select } from '@storybook/addon-knobs'; | ||
import { H1, H2, H3, Panel, ProgressCircle } from '@bigcommerce/big-design'; | ||
import { storiesOf } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import ProgressCircleReadme from '../../big-design/src/components/ProgressCircle/README.md'; | ||
import { CodePreview, PropTable } from '../components'; | ||
|
||
const percentKnob = { | ||
name: 'percentage', | ||
value: 50, | ||
options: { | ||
range: true, | ||
min: 0, | ||
max: 100, | ||
step: 1, | ||
}, | ||
}; | ||
storiesOf('ProgressCircle', module).add('Overview', () => ( | ||
<Panel> | ||
<H1>ProgressCircle</H1> | ||
<H2>Examples</H2> | ||
<H3 marginTop="xLarge">Determinant</H3> | ||
<CodePreview> | ||
<ProgressCircle error={false} percent={50} size="large" /> | ||
</CodePreview> | ||
<p> | ||
Determinant Progress represents a known amount of time or completeness for a task. A <code>percent</code> prop | ||
needs to be passed to render a determinate progress. | ||
</p> | ||
|
||
const sizes = ['large' as 'large', 'medium' as 'medium', 'small' as 'small', 'xSmall' as 'xSmall']; | ||
<H3 marginTop="xLarge">Indeterminant</H3> | ||
<CodePreview> | ||
<ProgressCircle size={'large'} /> | ||
</CodePreview> | ||
<p> | ||
Indeterminant Progress represents an unknown amount of time for a task to complete. Component will render an | ||
indeterminant progress when missing a <code>percent</code> prop. | ||
</p> | ||
|
||
storiesOf('ProgressCircle', module) | ||
.addParameters({ | ||
readme: { | ||
content: ProgressCircleReadme, | ||
}, | ||
}) | ||
.add('Determinant', () => ( | ||
<ProgressCircle | ||
error={boolean('error', false)} | ||
percent={number(percentKnob.name, percentKnob.value, percentKnob.options)} | ||
size={select('size', sizes, 'large')} | ||
/> | ||
)) | ||
.add('Indeterminant', () => <ProgressCircle size={select('size', sizes, 'large')} />); | ||
<H2 marginTop="xxxLarge">Properties & Methods</H2> | ||
<PropTable> | ||
<PropTable.Prop name="error" types="boolean"> | ||
Sets state to error. | ||
</PropTable.Prop> | ||
<PropTable.Prop name="percent" types="number"> | ||
Sets the fill length from 0 to 100. | ||
</PropTable.Prop> | ||
<PropTable.Prop name="size" types={['xSmall', 'small', 'medium', 'large']} defaults="medium"> | ||
Size of the component. | ||
</PropTable.Prop> | ||
</PropTable> | ||
</Panel> | ||
)); |
Oops, something went wrong.