wix-style-react
Version:
107 lines (90 loc) • 2.51 kB
JavaScript
import React from 'react';
import {
header,
tabs,
tab,
description,
importExample,
title,
columns,
divider,
code,
playground,
api,
testkit,
} from 'wix-storybook-utils/Sections';
import { storySettings } from '../test/storySettings';
import LinearProgressBar from '..';
import * as examples from './examples';
export default {
category: `${storySettings.category}|${storySettings.storyName}`,
storyName: 'LinearProgressBar',
component: LinearProgressBar,
componentPath: '..',
componentProps: {
errorMessage: 'some error message',
value: 20,
light: false,
error: false,
showProgressIndication: false,
skin: 'standard',
},
sections: [
header({
issueUrl: 'https://github.com/wix-private/wix-design-systems/issues/new/choose',
sourceUrl:
'https://github.com/wix-private/wix-design-systems/tree/master/packages/wix-style-react/src/LinearProgressBar/',
component: (
<div style={{ width: '50%' }}>
<LinearProgressBar value={45} showProgressIndication />
</div>
),
}),
tabs([
tab({
title: 'Description',
sections: [
columns([
description({
title: 'Description',
text: 'Component for indicating a progress along a process.',
}),
]),
columns([
importExample(
"import { LinearProgressBar } from 'wix-style-react';",
),
]),
divider(),
title('Examples'),
code({
title: 'Progress Indication',
description: 'Displaying a progress indicator in percentage.',
source: examples.progressIndication,
}),
code({
title: 'Skins',
description:
'LinearProgressBar has 4 skins: `"standard"` (default), `"warning"`, `"success"`, and `"premium"`.',
source: examples.skins,
}),
code({
title: 'Themes',
description: 'Appear in all different themes.',
source: examples.themes,
}),
code({
title: 'Error',
description: 'Error state',
source: examples.errors,
}),
],
}),
...[
{ title: 'API', sections: [api()] },
{ title: 'Testkit', sections: [testkit()] },
{ title: 'Playground', sections: [playground()] },
].map(tab),
]),
],
};