-
-
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.
- Loading branch information
Showing
7 changed files
with
156 additions
and
6 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,20 @@ | ||
import AddShoppingCartIcon from '@mui/icons-material/AddShoppingCart'; | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
import Alert from '@mui/joy/Alert'; | ||
|
||
export default function AlertSizes() { | ||
return ( | ||
<Box sx={{ display: 'flex', gap: 2, width: '100%', flexDirection: 'column' }}> | ||
<Alert size="sm" startDecorator={<AddShoppingCartIcon />}> | ||
This is an alert in the small size. | ||
</Alert> | ||
<Alert size="md" startDecorator={<AddShoppingCartIcon />}> | ||
This is an alert in the medium size. | ||
</Alert> | ||
<Alert size="lg" startDecorator={<AddShoppingCartIcon />}> | ||
This is an alert in the large size. | ||
</Alert> | ||
</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,20 @@ | ||
import AddShoppingCartIcon from '@mui/icons-material/AddShoppingCart'; | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
import Alert from '@mui/joy/Alert'; | ||
|
||
export default function AlertSizes() { | ||
return ( | ||
<Box sx={{ display: 'flex', gap: 2, width: '100%', flexDirection: 'column' }}> | ||
<Alert size="sm" startDecorator={<AddShoppingCartIcon />}> | ||
This is an alert in the small size. | ||
</Alert> | ||
<Alert size="md" startDecorator={<AddShoppingCartIcon />}> | ||
This is an alert in the medium size. | ||
</Alert> | ||
<Alert size="lg" startDecorator={<AddShoppingCartIcon />}> | ||
This is an alert in the large size. | ||
</Alert> | ||
</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,3 @@ | ||
<Alert size="sm" startDecorator={<AddShoppingCartIcon/>}>This is an alert in the small size.</Alert> | ||
<Alert size="md" startDecorator={<AddShoppingCartIcon/>}>This is an alert in the medium size.</Alert> | ||
<Alert size="lg" startDecorator={<AddShoppingCartIcon/>}>This is an alert in the large size.</Alert> |
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,53 @@ | ||
import * as React from 'react'; | ||
import Alert from '@mui/joy/Alert'; | ||
import PlaylistAddCheckCircleRoundedIcon from '@mui/icons-material/PlaylistAddCheckCircleRounded'; | ||
import Box from '@mui/joy/Box'; | ||
import Button from '@mui/joy/Button'; | ||
import Typography from '@mui/joy/Typography'; | ||
import IconButton from '@mui/joy/IconButton'; | ||
import AccountCircleRoundedIcon from '@mui/icons-material/AccountCircleRounded'; | ||
import CloseRoundedIcon from '@mui/icons-material/CloseRounded'; | ||
|
||
export default function AlertWithDecorators() { | ||
return ( | ||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, width: '100%' }}> | ||
<Alert | ||
startDecorator={<PlaylistAddCheckCircleRoundedIcon />} | ||
variant="soft" | ||
color="success" | ||
endDecorator={ | ||
<Button | ||
size="sm" | ||
variant="outlined" | ||
color="success" | ||
sx={{ | ||
textTransform: 'uppercase', | ||
fontSize: 'xs', | ||
fontWeight: 'xl', | ||
}} | ||
> | ||
Close | ||
</Button> | ||
} | ||
> | ||
<Typography fontWeight="md" fontSize="sm"> | ||
Your message was sent successfully. | ||
</Typography> | ||
</Alert> | ||
<Alert | ||
startDecorator={<AccountCircleRoundedIcon />} | ||
variant="outlined" | ||
color="neutral" | ||
endDecorator={ | ||
<IconButton variant="outlined" size="sm" color="neutral"> | ||
<CloseRoundedIcon /> | ||
</IconButton> | ||
} | ||
> | ||
<Typography fontWeight="md" fontSize="sm"> | ||
Your account was updated. | ||
</Typography> | ||
</Alert> | ||
</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,53 @@ | ||
import * as React from 'react'; | ||
import Alert from '@mui/joy/Alert'; | ||
import PlaylistAddCheckCircleRoundedIcon from '@mui/icons-material/PlaylistAddCheckCircleRounded'; | ||
import Box from '@mui/joy/Box'; | ||
import Button from '@mui/joy/Button'; | ||
import Typography from '@mui/joy/Typography'; | ||
import IconButton from '@mui/joy/IconButton'; | ||
import AccountCircleRoundedIcon from '@mui/icons-material/AccountCircleRounded'; | ||
import CloseRoundedIcon from '@mui/icons-material/CloseRounded'; | ||
|
||
export default function AlertWithDecorators() { | ||
return ( | ||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, width: '100%' }}> | ||
<Alert | ||
startDecorator={<PlaylistAddCheckCircleRoundedIcon />} | ||
variant="soft" | ||
color="success" | ||
endDecorator={ | ||
<Button | ||
size="sm" | ||
variant="outlined" | ||
color="success" | ||
sx={{ | ||
textTransform: 'uppercase', | ||
fontSize: 'xs', | ||
fontWeight: 'xl', | ||
}} | ||
> | ||
Close | ||
</Button> | ||
} | ||
> | ||
<Typography fontWeight="md" fontSize="sm"> | ||
Your message was sent successfully. | ||
</Typography> | ||
</Alert> | ||
<Alert | ||
startDecorator={<AccountCircleRoundedIcon />} | ||
variant="outlined" | ||
color="neutral" | ||
endDecorator={ | ||
<IconButton variant="outlined" size="sm" color="neutral"> | ||
<CloseRoundedIcon /> | ||
</IconButton> | ||
} | ||
> | ||
<Typography fontWeight="md" fontSize="sm"> | ||
Your account was updated. | ||
</Typography> | ||
</Alert> | ||
</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