UNPKG

@navinc/base-react-components

Version:
29 lines 1.71 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { storiesOf } from '@storybook/react'; import { boolean, text, object } from '@storybook/addon-knobs'; import { action } from '@storybook/addon-actions'; import withPropsCombinations from 'react-storybook-addon-props-combinations'; import readme from './readme.md'; import Card from './'; storiesOf('__ | Deprecated', module).add('Card', () => { const onBack = text('onBack', 'function()'); const onDismiss = text('onDismiss', 'function()'); const onNext = text('onNext', 'function()'); const onToggleKebab = text('onToggleKebab', 'function()'); const onUndo = text('onUndo', 'function()'); return (_jsx(Card, Object.assign({ buttonLabel: text('buttonLabel', 'Click this'), cardLabel: text('cardLabel', 'Some cool label'), title: text('title', 'Really fantastic title'), kebabMenuItems: object('kebabMenuItems', [{ label: 'hide', icon: 'foo' }]), onBack: onBack && action(onBack), onDismiss: onDismiss && action(onDismiss), onNext: onNext && action(onNext), onToggleKebab: onToggleKebab && action(onToggleKebab), onUndo: onUndo && action(onUndo), buttonDisabled: boolean('buttonDisabled', false), buttonForm: text('buttonForm', '') }, { children: text('Children', 'Body content goes here!') }), void 0)); }, { info: { text: readme }, }); storiesOf('__ | Deprecated', module).add('Card:variations', withPropsCombinations(Card, { buttonLabel: ['Next'], cardLabel: ['This is the label'], kebabMenuItems: [[]], onBack: ['', 'some function'], onNext: ['', 'some function'], title: ["Here's the copy"], buttonDisabled: [true, false], }), { info: { disable: true }, }); //# sourceMappingURL=story.js.map