Skip to content

Commit

Permalink
docs: add RadioGroup isOptional explanation (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordankoschei-okta authored Jul 18, 2023
1 parent 2eeea95 commit a4c11a6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {
Canvas,
Meta,
Title,
Subtitle,
Description,
Primary,
Controls,
Stories,
} from "@storybook/addon-docs";
import { Story } from "@storybook/blocks";
import * as RadioGroupStories from "./RadioGroup.stories";

<Meta of={RadioGroupStories} />

<Title of={RadioGroupStories} />
<Subtitle of={RadioGroupStories} />
<Description of={RadioGroupStories} />
<Primary of={RadioGroupStories} />

Note that `RadioGroup` does not include an `isOptional` prop, since a `RadioGroup` should
only be used if it's required. If you need similar functionality that supports optionality,
use a `Checkbox` or `CheckboxGroup` instead.

<Controls />
<Stories />
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ const storybookMeta: Meta<typeof RadioGroup> = {
label: "Speed",
},
decorators: [MuiThemeDecorator],
tags: ["autodocs"],
};

export default storybookMeta;
Expand Down

0 comments on commit a4c11a6

Please sign in to comment.