Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixing Alert and Error radio button examples #2197

Merged
merged 7 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/react/radio/stories/Radio.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Radio Group should be used in tandem with [Form Field](/components/inputs/form-f

### Disabled

Set the `disabled` prop of the Radio Button to prevent users from interacting with it.
Set the `disabled` prop of the Radio Button to prevent users from interacting with it. Be careful not to disable a pre-selected Radio Button, this will block keyboard access from the entire Radio Group.

<ExampleCodeBlock code={Disabled} />

Expand Down
4 changes: 2 additions & 2 deletions modules/react/radio/stories/examples/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export const Alert = () => {
<FormField
error={FormField.ErrorType.Alert}
hintId="hint-alert"
hintText="Deep Dish is no longer available. Please select a different crust."
hintText="Deep dish is an extra $2.99"
label="Choose Your Pizza Crust"
useFieldset={true}
>
<RadioGroup name={useUniqueId()} onChange={handleChange} value={value}>
<Radio disabled={true} label="Deep dish (sold out)" value="deep-dish" />
<Radio label="Deep dish" value="deep-dish" />
<Radio label="Thin" value="thin" />
<Radio label="Gluten free" value="gluten-free" />
<Radio label="Cauliflower" value="cauliflower" />
Expand Down
4 changes: 2 additions & 2 deletions modules/react/radio/stories/examples/Error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export const Error = () => {
<FormField
error={FormField.ErrorType.Error}
hintId="hint-error"
hintText="Deep Dish is no longer available. Please select a different crust."
hintText="Deep Dish is currently sold out."
label="Choose Your Pizza Crust"
useFieldset={true}
>
<RadioGroup name={useUniqueId()} onChange={handleChange} value={value}>
<Radio disabled={true} label="Deep dish (sold out)" value="deep-dish" />
<Radio label="Deep dish" value="deep-dish" />
<Radio label="Thin" value="thin" />
<Radio label="Gluten free" value="gluten-free" />
<Radio label="Cauliflower" value="cauliflower" />
Expand Down