diff --git a/src/components/button/ButtonIcon.stories.mdx b/src/components/button/ButtonIcon.stories.mdx deleted file mode 100644 index 22ad5cb0..00000000 --- a/src/components/button/ButtonIcon.stories.mdx +++ /dev/null @@ -1,175 +0,0 @@ -import IconAdd from '@aboutbits/react-material-icons/dist/IconAdd' -import IconInfo from '@aboutbits/react-material-icons/dist/IconInfo' -import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs' -import { Theme } from '../../../.storybook/components' -import { Tone, Mode, Size } from '../types' -import { ButtonVariant } from './types' -import { ButtonIcon } from './ButtonIcon' - - - -# ButtonIcon - -export const Template = ({ ...args }) => - - - - {Template.bind({})} - - - -### Props - - - -All the other externally defined props are - -``` -React.DetailedHTMLProps, HTMLButtonElement> -``` - - - - - -Additionally, all the `button.modeVariantTone` themes are used. See [Button](/docs/components-button-button--docs#theme). - -## Mode - -The `Mode` determines if the component is placed on LIGHT or DARK background. - - - - - - -
- -
-
-
- -## Variants - -The `Variant` determine if there is a background fill and a border. The `transparent` variant, while being transparent, still keep the same size as the other variants. - - - - - - - - - - - - - -## Size - -The size determine the padding between the button text and its border. - - - - - - - - - - - - - -## Tone - -The tone of the button determine it's background color. Given the prop, the component will look at the Tailwind config to determine its color. - -For additional information about Tailwind config, please refer to the [Tailwind documentation on colors](https://tailwindcss.com/docs/customizing-colors). - - - - - - - - - - - - - - - - - - - - - - -## Tone Custom - -If the provided colors are not satisfying the needs of a project, it is possible to add your own colors. In the following example, it is moderated what needs to be added to the `reactui.config.js`. See [ReactUI Integrations](https://github.com/aboutbits/react-ui-integrations) for more information. - -```js -module.exports = { - button: { - variantTone: { - SOLID: { - purple: - 'bg-purple-500 hover:bg-purple-600 text-white outline-purple-500', - }, - GHOST: { - purple: - 'hover:bg-purple-50 focus:bg-purple-50 border-purple-500 focus:border-transparent text-purple-500 outline-purple-500', - }, - TRANSPARENT: { - purple: 'hover:bg-purple-50 text-purple-500 focus:outline-purple-500', - }, - }, - }, -} -``` - - - - - - diff --git a/src/components/button/ButtonIconLink.stories.mdx b/src/components/button/ButtonIconLink.stories.mdx deleted file mode 100644 index 0ac6cf9f..00000000 --- a/src/components/button/ButtonIconLink.stories.mdx +++ /dev/null @@ -1,76 +0,0 @@ -import IconAdd from '@aboutbits/react-material-icons/dist/IconAdd' -import IconInfo from '@aboutbits/react-material-icons/dist/IconInfo' -import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs' -import { Tone, Mode, Size } from '../types' -import { ButtonVariant } from './types' -import { ButtonIconLink } from './ButtonIconLink' - - - -# ButtonIconLink - -export const Template = ({ ...args }) => - - - - {Template.bind({})} - - - -### Props - - - - - -All themes are the same as for the [ButtonIcon](/docs/components-button-buttonicon--docs#theme). - -## Mode - -The mode is the same as for the [ButtonIcon](/docs/components-button-buttonicon--docs#theme). - -## Variants - -The variants are the same as for the [ButtonIcon](/docs/components-button-buttonicon--docs#theme). - -## Size - -The size is the same as for the [ButtonIcon](/docs/components-button-buttonicon--docs#theme). - -## Tone - -The tone is the same as for the [ButtonIcon](/docs/components-button-buttonicon--docs#theme). diff --git a/src/components/button/ButtonLink.stories.mdx b/src/components/button/ButtonLink.stories.mdx deleted file mode 100644 index 8397108c..00000000 --- a/src/components/button/ButtonLink.stories.mdx +++ /dev/null @@ -1,105 +0,0 @@ -import IconAdd from '@aboutbits/react-material-icons/dist/IconAdd' -import IconInfo from '@aboutbits/react-material-icons/dist/IconInfo' -import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs' -import { Tone, Mode, Size } from '../types' -import { ButtonVariant } from './types' -import { ButtonLink } from './ButtonLink' - - - -# ButtonLink - -The ButtonLink component has the looks of a Button, but is an anchor tag under the hood. -You can define the type of link in the ReactUIProvider. By default, it will be a plain HTML anchor tag. - -export const Template = ({ children, ...args }) => ( - {children} -) - - - - {Template.bind({})} - - - -### Props - - - -All the other externally defined props are - -``` -AnchorHTMLAttributes -``` - - - -All themes are the same as for the [Button](/docs/components-button-button--docs#theme). - -## Examples - - - - - External link - - - - -## Mode - -The mode is the same as for the [Button](/docs/components-button-button--docs#size). - -## Variants - -The variants are the same as for the [Button](/docs/components-button-button--docs#variants). - -## Size - -The size is the same as for the [Button](/docs/components-button-button--docs#size). - -## Tone - -The tone is the same as for the [Button](/docs/components-button-button--docs#tone). diff --git a/src/components/button/SubmitButton.stories.mdx b/src/components/button/SubmitButton.stories.mdx deleted file mode 100644 index 9a9f4da6..00000000 --- a/src/components/button/SubmitButton.stories.mdx +++ /dev/null @@ -1,75 +0,0 @@ -import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs' -import { action } from '@storybook/addon-actions' -import { Form, useForm } from 'react-hook-form' -import { SubmitButton } from './SubmitButton' - - { - const form = useForm() - return ( -
- - - ) - }, - ]} -/> - -export const Template = ({ children, ...args }) => ( - {children} -) - -# SubmitButton - -The **_default values_** for variant, size, and tone can be found in the [Button Section](/docs/components-button-button--docs). - -The submit button uses `React Hook Form` to automatically disable during submitting. - -When the submit button is not placed inside a form (i.e. it has no form context), you can use the `formControl` prop to pass the control of the form. - -## Usage - -```jsx -const form = useForm({ defaultValues: { name: '', email: '' }}) -
{ - await new Promise((resolve) => setTimeout(resolve, 1000)) - alert(JSON.stringify(values, null, 2)) - }} -> - - Submit -
-``` - - - - {Template.bind({})} - - - -### Props: - - - -All the other externally defined props are: - -``` -React.DetailedHTMLProps, HTMLButtonElement> & ButtonProps -``` - -## Disabled - - - - {Template.bind({})} - -