import { Global } from '@emotion/react'; import React from 'react'; import { config as designConfig, withDesign } from 'storybook-addon-designs'; import tw, { css, styled } from 'twin.macro'; import Button from '~/inputs/Button'; import { buttonColors, buttonSizes, buttonVariants } from '~/inputs/types'; export default { title: 'Inputs/Button', component: Button, args: { size: 'md', color: 'brand', variant: 'primary', children: 'Button', disabled: false, }, argTypes: { variant: { control: { type: 'select', options: buttonVariants, }, }, color: { control: { type: 'select', options: buttonColors, }, }, size: { control: { type: 'select', options: buttonSizes, }, }, }, decorators: [ withDesign, (Story) => ( <> {Story()} ), ], parameters: { design: designConfig({ type: 'figma', url: 'https://www.figma.com/file/77dkQryMN3UStlzTDFl5xd/Proper-2021-Sprints?node-id=2839%3A2724', }), }, }; const Template = (args) => ); export const All = (props) => ( <>
); const DIFFERENT_BACKGROUNDS = [ styled.div(() => tw`p-4 bg-white ring-offset-white`), styled.div(() => tw`p-4 bg-black ring-offset-black`), styled.div(() => tw`p-4 bg-indigo-900 ring-offset-indigo-900`), ]; export const AgainstDifferentBackgrounds = (props) => ( <> {DIFFERENT_BACKGROUNDS.map((Container, index) => (