`Default`, `Primary`, `Destructive`, `Secondary`
- *If no `variant` is specified, a `Default` button will be rendered.
- */ export const Variants: Story = { render: ({ reversed }) => ( -When a Button is supplied to the `icon` prop, it displays an icon.
- *`import trashIcon from "@kaizen/component-library/icons/trash.icon.svg"`
- *Once the icons are imported, you can pass them directly into the Button component.
- *The consumer can specify the icon placement with the iconPosition prop, default position is start.
- */ +const sourceCodeIcon = ` +import { Button, AddIcon } from "@kaizen/components" + +} /> +` + export const Icon: Story = { - render: () => ( -The `working` prop should be used in situations where a button action triggers a change in UI state but needs to wait for a server response, such as submitting a form
- *In conjuction use the `workingLabel` prop to update the label of the button when the working state is triggered.
- *Alternatively use the `workingLabelHidden` prop to hide the button label all together.
- */ export const Working: Story = { render: () => ( -Use the LoadingInput component from the loading-skeleton package. Please refer to the LoadingInput Component guidelines.
- * `import { LoadingInput } from "@kaizen/loading-skeleton"` - */ export const Loading: Story = { render: () =>Button extends native HTML "form" attributes for `button`.
- *You can use this to submit a `form` using `Button` with a matching form id.
- */ export const NativeFormButton: Story = { render: () => ( <> diff --git a/packages/components/src/Button/IconButton/_docs/IconButton.mdx b/packages/components/src/Button/IconButton/_docs/IconButton.mdx index 0399dda4bc4..c0148dc37d7 100644 --- a/packages/components/src/Button/IconButton/_docs/IconButton.mdx +++ b/packages/components/src/Button/IconButton/_docs/IconButton.mdx @@ -1,5 +1,5 @@ import { Canvas, Controls, Meta } from "@storybook/blocks" -import { ResourceLinks, KaioNotification, Installation } from "~storybook/components" +import { ResourceLinks, KaioNotification, Installation, LinkTo } from "~storybook/components" import * as IconButtonStories from "./IconButton.stories" @@ -22,7 +22,8 @@ import * as IconButtonStories from "./IconButton.stories" ## Overview -Buttons perform actions. +A button with an icon and no visible text (a label is required for accessibility). +Use any