Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Add "extend component sizes and variants" section (#34050)
- Loading branch information
1 parent
2991f58
commit 81b0ac9
Showing
21 changed files
with
340 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import * as React from 'react'; | ||
import AspectRatio from '@mui/joy/AspectRatio'; | ||
import Grid from '@mui/joy/Grid'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function VariantsRatio() { | ||
return ( | ||
<Grid container spacing={2} sx={{ width: '100%' }}> | ||
<Grid xs={6} md> | ||
<AspectRatio variant="plain"> | ||
<Typography level="inherit" fontWeight="lg"> | ||
Plain | ||
</Typography> | ||
</AspectRatio> | ||
</Grid> | ||
<Grid xs={6} md> | ||
<AspectRatio variant="outlined"> | ||
<Typography level="inherit" fontWeight="lg"> | ||
Outlined | ||
</Typography> | ||
</AspectRatio> | ||
</Grid> | ||
<Grid xs={6} md> | ||
<AspectRatio variant="soft"> | ||
<Typography level="inherit" fontWeight="lg"> | ||
Soft | ||
</Typography> | ||
</AspectRatio> | ||
</Grid> | ||
<Grid xs={6} md> | ||
<AspectRatio variant="solid"> | ||
<Typography level="inherit" fontWeight="lg"> | ||
solid | ||
</Typography> | ||
</AspectRatio> | ||
</Grid> | ||
</Grid> | ||
); | ||
} |
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,39 @@ | ||
import * as React from 'react'; | ||
import AspectRatio from '@mui/joy/AspectRatio'; | ||
import Grid from '@mui/joy/Grid'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function VariantsRatio() { | ||
return ( | ||
<Grid container spacing={2} sx={{ width: '100%' }}> | ||
<Grid xs={6} md> | ||
<AspectRatio variant="plain"> | ||
<Typography level="inherit" fontWeight="lg"> | ||
Plain | ||
</Typography> | ||
</AspectRatio> | ||
</Grid> | ||
<Grid xs={6} md> | ||
<AspectRatio variant="outlined"> | ||
<Typography level="inherit" fontWeight="lg"> | ||
Outlined | ||
</Typography> | ||
</AspectRatio> | ||
</Grid> | ||
<Grid xs={6} md> | ||
<AspectRatio variant="soft"> | ||
<Typography level="inherit" fontWeight="lg"> | ||
Soft | ||
</Typography> | ||
</AspectRatio> | ||
</Grid> | ||
<Grid xs={6} md> | ||
<AspectRatio variant="solid"> | ||
<Typography level="inherit" fontWeight="lg"> | ||
solid | ||
</Typography> | ||
</AspectRatio> | ||
</Grid> | ||
</Grid> | ||
); | ||
} |
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,14 @@ | ||
import * as React from 'react'; | ||
import Avatar from '@mui/joy/Avatar'; | ||
import Box from '@mui/joy/Box'; | ||
|
||
export default function AvatarVariants() { | ||
return ( | ||
<Box sx={{ display: 'flex', gap: 2, alignItems: 'center' }}> | ||
<Avatar variant="soft" /> | ||
<Avatar variant="solid" /> | ||
<Avatar variant="outlined" /> | ||
<Avatar variant="plain" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import * as React from 'react'; | ||
import Avatar from '@mui/joy/Avatar'; | ||
import Box from '@mui/joy/Box'; | ||
|
||
export default function AvatarVariants() { | ||
return ( | ||
<Box sx={{ display: 'flex', gap: 2, alignItems: 'center' }}> | ||
<Avatar variant="soft" /> | ||
<Avatar variant="solid" /> | ||
<Avatar variant="outlined" /> | ||
<Avatar variant="plain" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<Avatar variant="soft" /> | ||
<Avatar variant="solid" /> | ||
<Avatar variant="outlined" /> | ||
<Avatar variant="plain" /> |
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
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
Oops, something went wrong.