import React from 'react' import { TextButton } from '../' import { actions, HIDE_CONTROL, Icon, ICON_ARG, SPACE, Story } from '../helpers/storybook' export default { title: 'TextButton', component: TextButton, argTypes: { variant: { options: ['standard', 'action', 'danger', 'dark'] }, disabled: { control: 'boolean' }, children: { name: 'button text' }, ...actions('onClick', 'onFocus', 'onBlur'), }, } as const export const BasicUsage: Story = (args) => (
Danger Action Dark Disabled
) BasicUsage.argTypes = { variant: HIDE_CONTROL, disabled: HIDE_CONTROL, margin: SPACE, } BasicUsage.args = { children: 'Standard' } export const Multiple: Story = (args) => (

{' | '}

) Multiple.args = { children: 'Add', variant: 'action' } export const WithIcon: Story = ({ Icon: IconComponent, children, ...args }) => { return ( {children} ) } WithIcon.argTypes = { Icon: ICON_ARG } WithIcon.args = { children: 'Add' }