import React from 'react'; import { StoryFn, Meta } from '@storybook/react'; import { AlignItems, BorderColor, BorderStyle, Display, TextVariant, TextColor, } from '../../../helpers/constants/design-system'; import { Box, Text } from '..'; import README from './README.mdx'; import { ButtonLink, ButtonLinkSize } from '.'; export default { title: 'Components/ComponentLibrary/ButtonLink', component: ButtonLink, parameters: { docs: { page: README, }, }, argTypes: { as: { control: 'select', options: ['button', 'a'], }, children: { control: 'text', }, className: { control: 'text', }, danger: { control: 'boolean', }, size: { control: 'select', options: Object.values(ButtonLinkSize), }, }, args: { children: 'Button Link', }, } as Meta; export const DefaultStory: StoryFn = (args) => ( ); DefaultStory.storyName = 'Default'; export const SizeStory: StoryFn = (args) => ( <> Auto (default) Small Medium Large Inherits the font-size of the parent element.{' '} Learn more Inherits the font-size of the parent element.{' '} Learn more Inherits the font-size of the parent element.{' '} Learn more Inherits the font-size of the parent element and example with override for a success color.{' '} Learn more ); SizeStory.storyName = 'Size'; export const Danger: StoryFn = (args) => ( Normal {/* Test Anchor tag to match exactly as button */} Danger ); export const Href: StoryFn = (args) => ( Href example ); Href.args = { href: '/metamask', }; export const ExternalLink: StoryFn = (args) => ( Anchor element with external link ); ExternalLink.args = { href: 'https://metamask.io/', externalLink: true, }; export const HitArea: StoryFn = (args) => ( <> Default Auto (default) Small Medium Large Add paddingLeft and paddingRight props Auto (default) Small Medium Large Add block prop Large block ); HitArea.args = { borderColor: BorderColor.errorDefault, borderStyle: BorderStyle.dashed, };