Skip to content

Commit

Permalink
storybook docs and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mkernohanbc committed Aug 12, 2024
1 parent 411cede commit 198a322
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, ButtonGroup } from "../components";
import { ButtonGroupProps } from "@/components/ButtonGroup";

const meta = {
title: "Components/Button/Button group",
title: "Components/Button/ButtonGroup",
component: ButtonGroup,
parameters: {
layout: "centered",
Expand Down
4 changes: 4 additions & 0 deletions packages/react-components/src/stories/InlineAlert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ Use the `title` and optional `description` props to populate an alert's content:

<Canvas of={InlineAlertStories.InlineAlertTemplate} />

Use the `buttons` prop to pass an array of button components, which are rendered inside a [ButtonGroup](/docs/components-button-button-group--docs):

<Canvas of={InlineAlertStories.AlertWithButtons} />

Pass `isIconHidden` to hide the theme icon on the left:

<Canvas of={InlineAlertStories.InlineAlertWithoutIcon} />
Expand Down
4 changes: 4 additions & 0 deletions packages/react-components/src/stories/InlineAlert.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ const meta = {
control: { type: "text" },
description: "Sets the alert text",
},
buttons: {
control: { type: "object" },
description: "Expects an array of button components",
},
isIconHidden: {
control: { type: "boolean" },
description: "Show or hide the left icon",
Expand Down

0 comments on commit 198a322

Please sign in to comment.