UNPKG

@wix/design-system

Version:

@wix/design-system

35 lines 1.97 kB
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray"; import { header, tabs, tab, description, title, divider, example, api, testkit } from '@wix/wix-storybook-utils/Sections'; import { storySettings } from '../test/storySettings'; import AnalyticsLayout from '..'; export default { category: "".concat(storySettings.category, "/AnalyticsSummary"), storyName: 'AnalyticsLayout', component: AnalyticsLayout, componentPath: '..', componentProps: {}, exampleProps: {}, sections: [header({ sourceUrl: "https://github.com/wix-private/wix-design-systems/tree/master/packages/wix-design-system/src/".concat(AnalyticsLayout.displayName, "/") }), tabs([tab({ title: 'Description', sections: [description({ title: 'Description', text: 'AnalyticsLayout is a smart layout that arrange items according to a min and max items per row.' }), divider(), title('Examples'), example({ title: 'Minimum Width', text: 'Width depends on parent’s container, but cannot be less than 636px.', source: "<AnalyticsLayout items={[1,2,3, 4 ,5 ,6, 7, 8]}>\n {( item, index, rowItemsCount ) => (\n <AnalyticsLayout.Cell>\n <Box margin=\"SP4\">item {item} ({index + 1} / {rowItemsCount})</Box>\n </AnalyticsLayout.Cell>\n )}\n </AnalyticsLayout>" }), example({ title: 'Disabled Highlight', text: 'Disable cell highlighting state', source: "<AnalyticsLayout items={[1,2,3, 4 ,5 ,6, 7, 8]}>\n {( item, index, rowItemsCount ) => (\n <AnalyticsLayout.Cell disableHighlight>\n <Box margin=\"SP4\">item {item} ({index + 1} / {rowItemsCount})</Box>\n </AnalyticsLayout.Cell>\n )}\n </AnalyticsLayout>" })] })].concat(_toConsumableArray([{ title: 'API', sections: [api()] }, { title: 'Testkit', sections: [testkit()] }].map(tab))))] };