-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/mui/material-ui into pr/3…
…4054
- Loading branch information
Showing
31 changed files
with
842 additions
and
173 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
58 changes: 58 additions & 0 deletions
58
docs/data/joy/components/radio/ExampleSegmentedControls.js
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,58 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
import Radio from '@mui/joy/Radio'; | ||
import RadioGroup from '@mui/joy/RadioGroup'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function RadioButtonsGroup() { | ||
const [justify, setJustify] = React.useState('flex-start'); | ||
return ( | ||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}> | ||
<Typography id="segmented-controls-example" fontWeight="lg" fontSize="sm"> | ||
Justify: | ||
</Typography> | ||
<RadioGroup | ||
row | ||
aria-labelledby="segmented-controls-example" | ||
name="justify" | ||
value={justify} | ||
onChange={(event) => setJustify(event.target.value)} | ||
sx={{ | ||
minHeight: 48, | ||
padding: '4px', | ||
borderRadius: 'md', | ||
bgcolor: 'neutral.softBg', | ||
'--RadioGroup-gap': '4px', | ||
'--Radio-action-radius': '8px', | ||
}} | ||
> | ||
{['flex-start', 'center', 'flex-end'].map((item) => ( | ||
<Radio | ||
color="neutral" | ||
value={item} | ||
disableIcon | ||
label={item} | ||
variant="plain" | ||
sx={{ | ||
px: 2, | ||
alignItems: 'center', | ||
}} | ||
componentsProps={{ | ||
action: ({ checked }) => ({ | ||
sx: { | ||
...(checked && { | ||
bgcolor: 'background.surface', | ||
boxShadow: 'md', | ||
'&:hover': { | ||
bgcolor: 'background.surface', | ||
}, | ||
}), | ||
}, | ||
}), | ||
}} | ||
/> | ||
))} | ||
</RadioGroup> | ||
</Box> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as React from 'react'; | ||
import TopLayoutBlog from 'docs/src/modules/components/TopLayoutBlog'; | ||
import { docs } from './making-customizable-components.md?@mui/markdown'; | ||
|
||
export default function Page() { | ||
return <TopLayoutBlog docs={docs} />; | ||
} |
Oops, something went wrong.