import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { text, boolean, withKnobs, select } from '@storybook/addon-knobs/react'; import { MainButton, DropDownItem, Icons } from 'asc-web-components'; import Section from '../../../.storybook/decorators/section'; import withReadme from 'storybook-readme/with-readme'; import Readme from './README.md'; const iconNames = Object.keys(Icons); function ClickMainButton(e, credentials) { console.log("ClickMainButton", e, credentials); } function ClickSecondaryButton(e, credentials) { console.log("ClickSecondaryButton", e, credentials); } storiesOf('Components|MainButton', module) .addDecorator(withKnobs) .addDecorator(withReadme(Readme)) .add('main button', () => { let isDropdown=boolean('isDropdown', true); let icon = !isDropdown ? {iconName: `${select('iconName', iconNames, 'PeopleIcon')}`} : {}; return (
action('New employee clicked')} /> action('New quest clicked')} /> action('New department clicked')} /> action('Invitation link clicked')} /> action('Invite again clicked')} /> action('Import people clicked')} />
)});