-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
a2ef8a6
commit 2a5469d
Showing
54 changed files
with
368 additions
and
181 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,51 @@ | ||
import * as React from 'react'; | ||
import AspectRatio from '@mui/joy/AspectRatio'; | ||
import Button from '@mui/joy/Button'; | ||
import Card from '@mui/joy/Card'; | ||
import CardContent from '@mui/joy/CardContent'; | ||
import CardActions from '@mui/joy/CardActions'; | ||
import Typography from '@mui/joy/Typography'; | ||
import Stack from '@mui/joy/Stack'; | ||
import FormControl from '@mui/joy/FormControl'; | ||
import FormLabel from '@mui/joy/FormLabel'; | ||
import Switch from '@mui/joy/Switch'; | ||
|
||
export default function FlexAspectRatio() { | ||
const [flex, setFlex] = React.useState(false); | ||
return ( | ||
<Stack spacing={2} alignItems="center"> | ||
<FormControl orientation="horizontal"> | ||
<FormLabel>Flex</FormLabel> | ||
<Switch checked={flex} onChange={(event) => setFlex(event.target.checked)} /> | ||
</FormControl> | ||
<Card | ||
orientation="horizontal" | ||
variant="outlined" | ||
sx={{ boxShadow: 'none', resize: 'horizontal', overflow: 'auto' }} | ||
> | ||
<AspectRatio ratio="21/9" flex={flex} sx={{ flexBasis: 200 }}> | ||
<Typography level="h1" component="div"> | ||
21 / 9 | ||
</Typography> | ||
</AspectRatio> | ||
<CardContent> | ||
<Typography level="body-xs">20 APR 2023</Typography> | ||
<Typography level="title-lg" component="div"> | ||
Widget Title | ||
</Typography> | ||
<Typography level="body-lg"> | ||
Lorem ipsum is placeholder text commonly used in the graphic. | ||
</Typography> | ||
<CardActions buttonFlex="none"> | ||
<Button variant="outlined" color="neutral" size="sm"> | ||
See details | ||
</Button> | ||
<Button variant="solid" color="neutral" size="sm"> | ||
Learn more | ||
</Button> | ||
</CardActions> | ||
</CardContent> | ||
</Card> | ||
</Stack> | ||
); | ||
} |
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,51 @@ | ||
import * as React from 'react'; | ||
import AspectRatio from '@mui/joy/AspectRatio'; | ||
import Button from '@mui/joy/Button'; | ||
import Card from '@mui/joy/Card'; | ||
import CardContent from '@mui/joy/CardContent'; | ||
import CardActions from '@mui/joy/CardActions'; | ||
import Typography from '@mui/joy/Typography'; | ||
import Stack from '@mui/joy/Stack'; | ||
import FormControl from '@mui/joy/FormControl'; | ||
import FormLabel from '@mui/joy/FormLabel'; | ||
import Switch from '@mui/joy/Switch'; | ||
|
||
export default function FlexAspectRatio() { | ||
const [flex, setFlex] = React.useState(false); | ||
return ( | ||
<Stack spacing={2} alignItems="center"> | ||
<FormControl orientation="horizontal"> | ||
<FormLabel>Flex</FormLabel> | ||
<Switch checked={flex} onChange={(event) => setFlex(event.target.checked)} /> | ||
</FormControl> | ||
<Card | ||
orientation="horizontal" | ||
variant="outlined" | ||
sx={{ boxShadow: 'none', resize: 'horizontal', overflow: 'auto' }} | ||
> | ||
<AspectRatio ratio="21/9" flex={flex} sx={{ flexBasis: 200 }}> | ||
<Typography level="h1" component="div"> | ||
21 / 9 | ||
</Typography> | ||
</AspectRatio> | ||
<CardContent> | ||
<Typography level="body-xs">20 APR 2023</Typography> | ||
<Typography level="title-lg" component="div"> | ||
Widget Title | ||
</Typography> | ||
<Typography level="body-lg"> | ||
Lorem ipsum is placeholder text commonly used in the graphic. | ||
</Typography> | ||
<CardActions buttonFlex="none"> | ||
<Button variant="outlined" color="neutral" size="sm"> | ||
See details | ||
</Button> | ||
<Button variant="solid" color="neutral" size="sm"> | ||
Learn more | ||
</Button> | ||
</CardActions> | ||
</CardContent> | ||
</Card> | ||
</Stack> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<Button disabled variant="solid"> | ||
<Button disabled variant="solid" startDecorator={<Add />}> | ||
Solid | ||
</Button> | ||
<Button disabled variant="soft"> | ||
<Button disabled color="neutral" variant="soft" startDecorator={<Add />}> | ||
Soft | ||
</Button> | ||
<Button disabled variant="outlined"> | ||
<Button disabled color="success" variant="outlined" startDecorator={<Add />}> | ||
Outlined | ||
</Button> | ||
<Button disabled variant="plain"> | ||
<Button disabled color="danger" variant="plain" startDecorator={<Add />}> | ||
Plain | ||
</Button> |
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,23 +1,37 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
import IconButton from '@mui/joy/IconButton'; | ||
import FormControl from '@mui/joy/FormControl'; | ||
import FormLabel from '@mui/joy/FormLabel'; | ||
import Stack from '@mui/joy/Stack'; | ||
import Switch from '@mui/joy/Switch'; | ||
import FavoriteBorder from '@mui/icons-material/FavoriteBorder'; | ||
|
||
export default function IconButtons() { | ||
const [disabled, setDisabled] = React.useState(false); | ||
return ( | ||
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap', alignItems: 'center' }}> | ||
<IconButton variant="solid"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton variant="soft"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton variant="outlined"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton variant="plain"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
</Box> | ||
<Stack spacing={3} alignItems="center"> | ||
<FormControl orientation="horizontal"> | ||
<FormLabel>Disabled</FormLabel> | ||
<Switch | ||
checked={disabled} | ||
onChange={(event) => setDisabled(event.target.checked)} | ||
/> | ||
</FormControl> | ||
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap', alignItems: 'center' }}> | ||
<IconButton disabled={disabled} variant="solid"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton disabled={disabled} variant="soft"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton disabled={disabled} variant="outlined"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton disabled={disabled} variant="plain"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
</Box> | ||
</Stack> | ||
); | ||
} |
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,23 +1,37 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
import IconButton from '@mui/joy/IconButton'; | ||
import FormControl from '@mui/joy/FormControl'; | ||
import FormLabel from '@mui/joy/FormLabel'; | ||
import Stack from '@mui/joy/Stack'; | ||
import Switch from '@mui/joy/Switch'; | ||
import FavoriteBorder from '@mui/icons-material/FavoriteBorder'; | ||
|
||
export default function IconButtons() { | ||
const [disabled, setDisabled] = React.useState(false); | ||
return ( | ||
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap', alignItems: 'center' }}> | ||
<IconButton variant="solid"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton variant="soft"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton variant="outlined"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton variant="plain"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
</Box> | ||
<Stack spacing={3} alignItems="center"> | ||
<FormControl orientation="horizontal"> | ||
<FormLabel>Disabled</FormLabel> | ||
<Switch | ||
checked={disabled} | ||
onChange={(event) => setDisabled(event.target.checked)} | ||
/> | ||
</FormControl> | ||
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap', alignItems: 'center' }}> | ||
<IconButton disabled={disabled} variant="solid"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton disabled={disabled} variant="soft"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton disabled={disabled} variant="outlined"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
<IconButton disabled={disabled} variant="plain"> | ||
<FavoriteBorder /> | ||
</IconButton> | ||
</Box> | ||
</Stack> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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.