@wix/design-system
Version:
@wix/design-system
111 lines • 3.28 kB
JavaScript
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/StackedBarChart/docs/index.story.jsx";
import React from 'react';
import { header, tabs, tab, description, title, divider, code, playground, api, testkit } from '@wix/wix-storybook-utils/Sections';
import { storySettings } from '../test/storySettings';
import * as examples from './examples';
import StackedBarChart from '..';
import SectionHelper from '../../SectionHelper';
export default {
category: storySettings.category,
storyName: 'StackedBarChart',
component: StackedBarChart,
componentPath: '..',
componentProps: {
width: 800,
height: 400,
margin: {
top: 40,
bottom: 40,
left: 80,
right: 10
},
data: [{
label: 'Jan 20',
values: [500, 200]
}, {
label: 'Feb 20',
values: [200, 700]
}, {
label: 'Mar 20',
values: [0, 400]
}, {
label: 'Apr 20',
values: [900, 100]
}, {
label: 'Mai 20',
values: [300, 300]
}, {
label: 'Jun 20',
values: [400, 300]
}, {
label: 'Jul 20',
values: [100, 100]
}, {
label: 'Aug 20',
values: [0, 0]
}, {
label: 'Sep 20',
values: [800, 0]
}, {
label: 'Oct 20',
values: [600, 300]
}, {
label: 'Nov 20',
values: [200, 300]
}, {
label: 'Dec 20',
values: [300, 200]
}]
},
exampleProps: {
// Put here presets of props, for more info:
// https://github.com/wix/wix-ui/blob/master/packages/wix-storybook-utils/docs/usage.md
},
sections: [header({
sourceUrl: "https://github.com/wix-private/wix-design-systems/tree/master/packages/wix-design-system/src/".concat(StackedBarChart.displayName, "/")
}), tabs([tab({
title: 'Description',
sections: [description({
title: 'Description',
text: 'This line here should briefly describe component in just a sentence or two. It should be short and easy to read.'
}), divider(), description({
text: /*#__PURE__*/React.createElement(SectionHelper, {
title: "WARNING",
__self: this,
__source: {
fileName: _jsxFileName,
lineNumber: 70,
columnNumber: 15
}
}, "This component is a work in progress. Please, don't use this component unless you were instructed to by the WSR team.", /*#__PURE__*/React.createElement("br", {
__self: this,
__source: {
fileName: _jsxFileName,
lineNumber: 73,
columnNumber: 17
}
}), /*#__PURE__*/React.createElement("br", {
__self: this,
__source: {
fileName: _jsxFileName,
lineNumber: 74,
columnNumber: 17
}
}), "If decided to use this component, keep in mind that the API is not stable and can change anytime!")
}), title('Examples'), code({
compact: true,
initiallyOpen: true,
source: examples.simple
})]
})].concat(_toConsumableArray([{
title: 'API',
sections: [api()]
}, {
title: 'Testkit',
sections: [testkit()]
}, {
title: 'Playground',
sections: [playground()]
}].map(tab))))]
};