Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Radio][Joy] Integrate with form control (#34277)
- Loading branch information
1 parent
f015784
commit a2cd245
Showing
13 changed files
with
212 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import * as React from 'react'; | ||
import FormControl from '@mui/joy/FormControl'; | ||
import FormLabel from '@mui/joy/FormLabel'; | ||
import FormHelperText from '@mui/joy/FormHelperText'; | ||
import RadioGroup from '@mui/joy/RadioGroup'; | ||
import Radio from '@mui/joy/Radio'; | ||
import Sheet from '@mui/joy/Sheet'; | ||
|
||
export default function ExampleTiers() { | ||
return ( | ||
<Sheet | ||
variant="outlined" | ||
sx={{ | ||
boxShadow: 'sm', | ||
borderRadius: 'sm', | ||
p: 1, | ||
}} | ||
> | ||
<RadioGroup | ||
name="tiers" | ||
sx={{ gap: 1, '& > div': { p: 1, flexDirection: 'row', gap: 2 } }} | ||
> | ||
<FormControl> | ||
<Radio overlay value="small" /> | ||
<div> | ||
<FormLabel>Small</FormLabel> | ||
<FormHelperText> | ||
For light background jobs like sending email | ||
</FormHelperText> | ||
</div> | ||
</FormControl> | ||
<FormControl> | ||
<Radio overlay value="medium" /> | ||
<div> | ||
<FormLabel>Medium</FormLabel> | ||
<FormHelperText> | ||
For tasks like image resizing, exporting PDFs, etc. | ||
</FormHelperText> | ||
</div> | ||
</FormControl> | ||
<FormControl> | ||
<Radio overlay value="large" /> | ||
<div> | ||
<FormLabel>Large</FormLabel> | ||
<FormHelperText> | ||
For intensive tasks like video encoding, etc. | ||
</FormHelperText> | ||
</div> | ||
</FormControl> | ||
</RadioGroup> | ||
</Sheet> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as React from 'react'; | ||
import FormControl from '@mui/joy/FormControl'; | ||
import FormLabel from '@mui/joy/FormLabel'; | ||
import FormHelperText from '@mui/joy/FormHelperText'; | ||
import Radio from '@mui/joy/Radio'; | ||
|
||
export default function RadioButtonControl() { | ||
return ( | ||
<FormControl sx={{ p: 2, flexDirection: 'row', gap: 2 }}> | ||
<Radio overlay defaultChecked /> | ||
<div> | ||
<FormLabel>Selection title</FormLabel> | ||
<FormHelperText>One line description maximum lorem ipsum </FormHelperText> | ||
</div> | ||
</FormControl> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as React from 'react'; | ||
import Radio from '@mui/joy/Radio'; | ||
|
||
export default function RadioButtonLabel() { | ||
return <Radio label="Text" defaultChecked />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters