diff --git a/src/components/Button/Button.stories.tsx b/src/components/Button/Button.stories.tsx index db6fddd..3896ed8 100644 --- a/src/components/Button/Button.stories.tsx +++ b/src/components/Button/Button.stories.tsx @@ -1,20 +1,61 @@ import React from 'react' import {Story, Meta} from '@storybook/react' - +import {Icon} from '../Icons/Icon' import {Button} from './Button' export default { title: 'Components/Button', component: Button, argTypes: { - backgroundColor: {control: 'color'} + style: { + defaultValue: 'gray', + options: ['gray', 'primary', 'outline', 'ghost', 'link'], + control: {type: 'select'} + }, + size: { + defaultValue: 'md', + options: ['xs', 'sm', 'md', 'lg', 'responsive'], + control: {type: 'select'} + }, + status: { + defaultValue: 'normal', + options: ['normal', 'disabled'], + control: {type: 'radio'} + }, + outline: { + defaultValue: 'square', + options: ['square', 'round'], + control: {type: 'radio'} + } } } as Meta -const Template: Story = args => + + ) } + +export const Buttons = Template.bind({}) diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 2ccd0cb..419aa9d 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -1,8 +1,74 @@ import React from 'react' import cn from 'classnames' -import type {ComponentProps} from 'react' -// minor example -export function Button(props: ComponentProps<'button'>) { - return + + )) + } + + return ( +
+ {heading && ( + <> +
{heading}
+
+ + )} + + {hasMessage && userMessage()} + {prereqs && ( +
+
+ + Pre-Requisites + +
+ )} + + {progressPct && ( + <> +
+ {ProgressCircle(progressPct)} + + )} +
+ ) +} diff --git a/src/components/Typography/Text.tsx b/src/components/Typography/Text.tsx index 06cd96c..facdaa2 100644 --- a/src/components/Typography/Text.tsx +++ b/src/components/Typography/Text.tsx @@ -2,7 +2,7 @@ import React from 'react' import cn from 'classnames' import type {PropsWithChildren} from 'react' -type TextComponent = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' +type TextComponent = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'a' type TextSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' type FontWeight = 'font-medium' | 'font-normal' | 'font-black' | 'font-bold' diff --git a/tailwind.config.js b/tailwind.config.js index 2849da3..cf297e9 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -48,6 +48,10 @@ module.exports = { }, dropShadow: { 'button-hover': '-4px 4px 8px --color-primary-500' + }, + strokeWidth: { + 5: '5', + 6: '6' } } },