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

[docs] Revise Joy UI "Radio" page #35893

Merged
merged 30 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d64fe3a
Title section
DevinCLane Jan 20, 2023
6f18a27
introduction
DevinCLane Jan 20, 2023
096e277
title section and introduction edits
DevinCLane Jan 23, 2023
bdbdb4b
introduction: add select component text
DevinCLane Jan 23, 2023
20f1519
introduction add most commonly used option
DevinCLane Jan 23, 2023
4a5f235
label
DevinCLane Jan 24, 2023
96fbc57
Radio Group typos
DevinCLane Jan 24, 2023
3afea4e
overlay
DevinCLane Jan 24, 2023
1e0bac0
anatomy: first pass
DevinCLane Jan 24, 2023
803554c
title section: match copy to material ui
DevinCLane Jan 24, 2023
fd2338c
introduction: second pass
DevinCLane Jan 24, 2023
81753df
focus outline
DevinCLane Jan 24, 2023
a628cc0
remove around component names
DevinCLane Jan 24, 2023
7cf4f1e
specify language to fenced code blocks
DevinCLane Jan 24, 2023
4a10268
rearrange structure
DevinCLane Jan 25, 2023
d03a6db
standardize component formatting
DevinCLane Feb 2, 2023
e0c684b
without an icon: property vs artifact
DevinCLane Feb 2, 2023
66378bf
more component formatting
DevinCLane Feb 2, 2023
0fd9222
remove 'allow' per the style guide
DevinCLane Feb 6, 2023
1e22e8e
remove more allow
DevinCLane Feb 6, 2023
6ea311e
component capitalization formatting
DevinCLane Feb 6, 2023
b30bc80
Apply suggestions from code review
DevinCLane Feb 10, 2023
379d6d4
break variants into ordered sections, add demos
DevinCLane Feb 10, 2023
d376f84
demos: run yarn docs:typescript:formatted to generate the js
DevinCLane Feb 10, 2023
b1ee817
clean up demos
DevinCLane Feb 10, 2023
d4392a9
Merge branch 'master' into joy-radio
DevinCLane Feb 19, 2023
15f04a9
Merge branch 'master' of https://github.com/mui/material-ui into joy-…
siriwatknp Mar 20, 2023
e4b208f
update content
siriwatknp Mar 20, 2023
5f936d4
run docs:api
siriwatknp Mar 20, 2023
c893989
final copy edits
samuelsycamore Mar 30, 2023
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
4 changes: 2 additions & 2 deletions docs/data/joy/components/radio-button/RadioButtonsGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export default function RadioButtonsGroup() {
slotProps={{ input: { 'aria-describedby': 'female-helper-text' } }}
/>
<FormHelperText id="female-helper-text">
A helper text for this radio.
Helper text for this radio.
</FormHelperText>
<Radio value="male" label="Male" />
<Radio value="other" label="Other" />
</RadioGroup>
<FormHelperText>This is a helper text.</FormHelperText>
<FormHelperText>This is helper text.</FormHelperText>
</FormControl>
);
}
4 changes: 2 additions & 2 deletions docs/data/joy/components/radio-button/RadioButtonsGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export default function RadioButtonsGroup() {
slotProps={{ input: { 'aria-describedby': 'female-helper-text' } }}
/>
<FormHelperText id="female-helper-text">
A helper text for this radio.
Helper text for this radio.
</FormHelperText>
<Radio value="male" label="Male" />
<Radio value="other" label="Other" />
</RadioGroup>
<FormHelperText>This is a helper text.</FormHelperText>
<FormHelperText>This is helper text.</FormHelperText>
</FormControl>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
slotProps={{ input: { 'aria-describedby': 'female-helper-text' } }}
/>
<FormHelperText id="female-helper-text">
A helper text for this radio.
Helper text for this radio.
</FormHelperText>
<Radio value="male" label="Male" />
<Radio value="other" label="Other" />
</RadioGroup>
<FormHelperText>This is a helper text.</FormHelperText>
<FormHelperText>This is helper text.</FormHelperText>
</FormControl>
21 changes: 21 additions & 0 deletions docs/data/joy/components/radio-button/RadioColors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import Radio from '@mui/joy/Radio';
import RadioGroup from '@mui/joy/RadioGroup';

export default function RadioColors() {
return (
<FormControl>
<FormLabel>Colors</FormLabel>
<RadioGroup defaultValue="medium" name="radio-buttons-group">
<Radio value="primary" label="Primary" color="primary" />
<Radio value="neutral" label="Neutral" color="neutral" />
<Radio value="danger" label="Danger" color="danger" />
<Radio value="info" label="Info" color="info" />
<Radio value="success" label="Success" color="success" />
<Radio value="warning" label="Warning" color="warning" />
</RadioGroup>
</FormControl>
);
}
21 changes: 21 additions & 0 deletions docs/data/joy/components/radio-button/RadioColors.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import Radio from '@mui/joy/Radio';
import RadioGroup from '@mui/joy/RadioGroup';

export default function RadioColors() {
return (
<FormControl>
<FormLabel>Colors</FormLabel>
<RadioGroup defaultValue="medium" name="radio-buttons-group">
<Radio value="primary" label="Primary" color="primary" />
<Radio value="neutral" label="Neutral" color="neutral" />
<Radio value="danger" label="Danger" color="danger" />
<Radio value="info" label="Info" color="info" />
<Radio value="success" label="Success" color="success" />
<Radio value="warning" label="Warning" color="warning" />
</RadioGroup>
</FormControl>
);
}
11 changes: 11 additions & 0 deletions docs/data/joy/components/radio-button/RadioColors.tsx.preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<FormControl>
<FormLabel>Colors</FormLabel>
<RadioGroup defaultValue="medium" name="radio-buttons-group">
<Radio value="primary" label="Primary" color="primary" />
<Radio value="neutral" label="Neutral" color="neutral" />
<Radio value="danger" label="Danger" color="danger" />
<Radio value="info" label="Info" color="info" />
<Radio value="success" label="Success" color="success" />
<Radio value="warning" label="Warning" color="warning" />
</RadioGroup>
</FormControl>
18 changes: 18 additions & 0 deletions docs/data/joy/components/radio-button/RadioSizes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import Radio from '@mui/joy/Radio';
import RadioGroup from '@mui/joy/RadioGroup';

export default function RadioSizes() {
return (
<FormControl>
<FormLabel>Sizes</FormLabel>
<RadioGroup defaultValue="medium" name="radio-buttons-group">
<Radio value="small" label="Small" size="sm" />
<Radio value="medium" label="Medium" size="md" />
<Radio value="large" label="Large" size="lg" />
</RadioGroup>
</FormControl>
);
}
18 changes: 18 additions & 0 deletions docs/data/joy/components/radio-button/RadioSizes.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import Radio from '@mui/joy/Radio';
import RadioGroup from '@mui/joy/RadioGroup';

export default function RadioSizes() {
return (
<FormControl>
<FormLabel>Sizes</FormLabel>
<RadioGroup defaultValue="medium" name="radio-buttons-group">
<Radio value="small" label="Small" size="sm" />
<Radio value="medium" label="Medium" size="md" />
<Radio value="large" label="Large" size="lg" />
</RadioGroup>
</FormControl>
);
}
8 changes: 8 additions & 0 deletions docs/data/joy/components/radio-button/RadioSizes.tsx.preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<FormControl>
<FormLabel>Sizes</FormLabel>
<RadioGroup defaultValue="medium" name="radio-buttons-group">
<Radio value="small" label="Small" size="sm" />
<Radio value="medium" label="Medium" size="md" />
<Radio value="large" label="Large" size="lg" />
</RadioGroup>
</FormControl>
19 changes: 19 additions & 0 deletions docs/data/joy/components/radio-button/RadioVariants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import Radio from '@mui/joy/Radio';
import RadioGroup from '@mui/joy/RadioGroup';

export default function RadioVariants() {
return (
<FormControl>
<FormLabel>Variants</FormLabel>
<RadioGroup defaultValue="outlined" name="radio-buttons-group">
<Radio value="outlined" label="Outlined" variant="outlined" />
<Radio value="soft" label="Soft" variant="soft" />
<Radio value="solid" label="Solid" variant="solid" />
<Radio value="plain" label="Plain" variant="plain" />
</RadioGroup>
</FormControl>
);
}
19 changes: 19 additions & 0 deletions docs/data/joy/components/radio-button/RadioVariants.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import Radio from '@mui/joy/Radio';
import RadioGroup from '@mui/joy/RadioGroup';

export default function RadioVariants() {
return (
<FormControl>
<FormLabel>Variants</FormLabel>
<RadioGroup defaultValue="outlined" name="radio-buttons-group">
<Radio value="outlined" label="Outlined" variant="outlined" />
<Radio value="soft" label="Soft" variant="soft" />
<Radio value="solid" label="Solid" variant="solid" />
<Radio value="plain" label="Plain" variant="plain" />
</RadioGroup>
</FormControl>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<FormControl>
<FormLabel>Variants</FormLabel>
<RadioGroup defaultValue="outlined" name="radio-buttons-group">
<Radio value="outlined" label="Outlined" variant="outlined" />
<Radio value="soft" label="Soft" variant="soft" />
<Radio value="solid" label="Solid" variant="solid" />
<Radio value="plain" label="Plain" variant="plain" />
</RadioGroup>
</FormControl>
Loading