UNPKG

wix-style-react

Version:
77 lines (62 loc) 1.75 kB
import { header, tabs, tab, description, importExample, title, divider, example, playground, api, testkit, } from 'wix-storybook-utils/Sections'; import { storySettings } from '../test/storySettings'; import * as examples from './examples'; import TrendIndicator from '..'; export default { category: `${storySettings.category}|${storySettings.storyName}`, storyName: 'TrendIndicator', component: TrendIndicator, componentPath: '..', componentProps: { value: 23, inverted: false, }, sections: [ header({ sourceUrl: `https://github.com/wix-private/wix-design-systems/tree/master/packages/wix-style-react/src/${TrendIndicator.displayName}/`, }), tabs([ tab({ title: 'Description', sections: [ description({ title: 'Description', text: 'TrendIndicator shows a percentage based positive or negative trend.', }), importExample(), divider(), title('Examples'), example({ title: 'Trends', description: 'Positive `value` displays with an arrow up, negative - with an arrow down.', source: examples.trends, }), example({ title: 'Inverted trends', description: 'By default, positive numbers are displayed in green, negative - with red. This could be changed with `inverted` property.', source: examples.invertedTrends, }), ], }), ...[ { title: 'API', sections: [api()] }, { title: 'Testkit', sections: [testkit()] }, { title: 'Playground', sections: [playground()] }, ].map(tab), ]), ], };