-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Joy] Miscellaneous improvements (#35769)
- Loading branch information
1 parent
612db95
commit bff4835
Showing
15 changed files
with
147 additions
and
137 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 |
---|---|---|
@@ -1,19 +1,13 @@ | ||
import * as React from 'react'; | ||
import AspectRatio from '@mui/joy/AspectRatio'; | ||
import Sheet from '@mui/joy/Sheet'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function BasicRatio() { | ||
return ( | ||
<Sheet | ||
variant="outlined" | ||
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }} | ||
> | ||
<AspectRatio> | ||
<Typography level="h2" component="div"> | ||
16/9 | ||
</Typography> | ||
</AspectRatio> | ||
</Sheet> | ||
<AspectRatio sx={{ width: 300 }}> | ||
<Typography level="h2" component="div"> | ||
16/9 | ||
</Typography> | ||
</AspectRatio> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,19 +1,13 @@ | ||
import * as React from 'react'; | ||
import AspectRatio from '@mui/joy/AspectRatio'; | ||
import Sheet from '@mui/joy/Sheet'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function BasicRatio() { | ||
return ( | ||
<Sheet | ||
variant="outlined" | ||
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }} | ||
> | ||
<AspectRatio> | ||
<Typography level="h2" component="div"> | ||
16/9 | ||
</Typography> | ||
</AspectRatio> | ||
</Sheet> | ||
<AspectRatio sx={{ width: 300 }}> | ||
<Typography level="h2" component="div"> | ||
16/9 | ||
</Typography> | ||
</AspectRatio> | ||
); | ||
} |
15 changes: 5 additions & 10 deletions
15
docs/data/joy/components/aspect-ratio/BasicRatio.tsx.preview
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
<Sheet | ||
variant="outlined" | ||
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }} | ||
> | ||
<AspectRatio> | ||
<Typography level="h2" component="div"> | ||
16/9 | ||
</Typography> | ||
</AspectRatio> | ||
</Sheet> | ||
<AspectRatio sx={{ width: 300 }}> | ||
<Typography level="h2" component="div"> | ||
16/9 | ||
</Typography> | ||
</AspectRatio> |
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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
import * as React from 'react'; | ||
import AspectRatio from '@mui/joy/AspectRatio'; | ||
import Sheet from '@mui/joy/Sheet'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function CustomRatio() { | ||
return ( | ||
<Sheet | ||
<AspectRatio | ||
variant="outlined" | ||
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }} | ||
ratio="4/3" | ||
sx={{ | ||
width: 300, | ||
bgcolor: 'background.level2', | ||
borderRadius: 'md', | ||
}} | ||
> | ||
<AspectRatio ratio="4/3"> | ||
<Typography level="h2" component="div"> | ||
4/3 | ||
</Typography> | ||
</AspectRatio> | ||
</Sheet> | ||
<Typography level="h2" component="div"> | ||
4/3 | ||
</Typography> | ||
</AspectRatio> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
import * as React from 'react'; | ||
import AspectRatio from '@mui/joy/AspectRatio'; | ||
import Sheet from '@mui/joy/Sheet'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function CustomRatio() { | ||
return ( | ||
<Sheet | ||
<AspectRatio | ||
variant="outlined" | ||
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }} | ||
ratio="4/3" | ||
sx={{ | ||
width: 300, | ||
bgcolor: 'background.level2', | ||
borderRadius: 'md', | ||
}} | ||
> | ||
<AspectRatio ratio="4/3"> | ||
<Typography level="h2" component="div"> | ||
4/3 | ||
</Typography> | ||
</AspectRatio> | ||
</Sheet> | ||
<Typography level="h2" component="div"> | ||
4/3 | ||
</Typography> | ||
</AspectRatio> | ||
); | ||
} |
19 changes: 11 additions & 8 deletions
19
docs/data/joy/components/aspect-ratio/CustomRatio.tsx.preview
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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
<Sheet | ||
<AspectRatio | ||
variant="outlined" | ||
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }} | ||
ratio="4/3" | ||
sx={{ | ||
width: 300, | ||
bgcolor: 'background.level2', | ||
borderRadius: 'md', | ||
}} | ||
> | ||
<AspectRatio ratio="4/3"> | ||
<Typography level="h2" component="div"> | ||
4/3 | ||
</Typography> | ||
</AspectRatio> | ||
</Sheet> | ||
<Typography level="h2" component="div"> | ||
4/3 | ||
</Typography> | ||
</AspectRatio> |
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.