-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbf998b
commit 13915fe
Showing
6 changed files
with
41 additions
and
1 deletion.
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,8 @@ | ||
<Sheet | ||
variant="outlined" | ||
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }} | ||
> | ||
<AspectRatio> | ||
<Typography level="h2">16 : 9</Typography> | ||
</AspectRatio> | ||
</Sheet> |
8 changes: 8 additions & 0 deletions
8
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Sheet | ||
variant="outlined" | ||
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }} | ||
> | ||
<AspectRatio ratio="4/3"> | ||
<Typography level="h2">4 : 3</Typography> | ||
</AspectRatio> | ||
</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
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,9 @@ | ||
<AspectRatio objectFit="contain"> | ||
<img | ||
src="https://images.unsplash.com/photo-1502657877623-f66bf489d236?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2369" | ||
alt="" | ||
/> | ||
</AspectRatio> | ||
<Typography level="body3" mt={2} textAlign="center"> | ||
An example of using <code>contain</code> value | ||
</Typography> |
6 changes: 6 additions & 0 deletions
6
docs/data/joy/components/aspect-ratio/MinMaxRatio.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<AspectRatio minHeight={120} maxHeight={200}> | ||
<img | ||
src="https://images.unsplash.com/photo-1502657877623-f66bf489d236?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2369" | ||
alt="" | ||
/> | ||
</AspectRatio> |
9 changes: 9 additions & 0 deletions
9
docs/data/joy/components/aspect-ratio/PlaceholderAspectRatio.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Card variant="outlined" sx={{ width: 300 }}> | ||
<AspectRatio> | ||
<div> | ||
<ImageIcon fontSize="xl5" sx={{ color: 'text.tertiary' }} /> | ||
</div> | ||
</AspectRatio> | ||
<Typography mt={2}>Title</Typography> | ||
<Typography level="body2">Description of the card.</Typography> | ||
</Card> |