import React from 'react'; import {ComponentStory, ComponentMeta} from '@storybook/react'; import {RectButton} from '../src'; export default { title: 'Inputs/RectButton', component: RectButton, parameters: { layout: 'centered' } } as ComponentMeta; export const Default: ComponentStory = (args) => ( Button ); Default.args = { flat: false, inverse: false } export const WithIconOnly: ComponentStory = (args) => ( ); WithIconOnly.args = { icon: 'ghost' } export const WithIconBehind: ComponentStory = (args) => ( Button ); WithIconBehind.args = { icon: 'ghost', iconPlacement: 'right' } export const WithIconAhead: ComponentStory = (args) => ( Button ); WithIconAhead.args = { icon: 'ghost', iconPlacement: 'left' } export const WithIconSmall: ComponentStory = (args) => ( Button ); WithIconSmall.args = { icon: 'ghost', iconSize: 'small' } export const Flat: ComponentStory = (args) => ( Button ); Flat.args = { flat: true, inverse: false } export const Inverse: ComponentStory = (args) => ( Button ); Inverse.args = { flat: false, inverse: true } export const Disabled: ComponentStory = (args) => ( Button ); Disabled.args = { disabled: true } export const Loading: ComponentStory = (args) => ( Button ); Loading.args = { loading: true, color: 'success' } export const LoadingOnClick: ComponentStory = (args) => ( Button ); LoadingOnClick.args = { showLoadingOnClick: true, color: 'success', onClick: async () => { return new Promise(res => setTimeout(res, 2_000)); } }