forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
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
8bf7458
commit 76a3521
Showing
64 changed files
with
1,763 additions
and
446 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,45 +1,41 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
import Button from '@mui/joy/Button'; | ||
import CardOverflow from '@mui/joy/CardOverflow'; | ||
import ModalDialog from '@mui/joy/ModalDialog'; | ||
import DialogTitle from '@mui/joy/DialogTitle'; | ||
import DialogContent from '@mui/joy/DialogContent'; | ||
import DialogActions from '@mui/joy/DialogActions'; | ||
import Divider from '@mui/joy/Divider'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function DividerInModalDialog() { | ||
return ( | ||
<ModalDialog | ||
aria-labelledby="divider-modal-title" | ||
aria-describedby="divider-modal-desc" | ||
sx={{ | ||
// this custom styles is for demonstration purpose, you might not need them in your app | ||
position: 'static', | ||
transform: 'none', | ||
maxWidth: 300, | ||
}} | ||
> | ||
<Typography fontSize="lg" fontWeight="lg" id="divider-modal-title"> | ||
Modal Title | ||
</Typography> | ||
<DialogTitle>Modal Title</DialogTitle> | ||
<Divider inset="none" /> | ||
<Typography level="body-sm" id="divider-modal-desc" fontSize="sm"> | ||
<DialogContent> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. | ||
Lorem Ipsum has been the industry standard dummy text ever since the 1500s | ||
</Typography> | ||
<Divider /> | ||
<Box | ||
</DialogContent> | ||
<CardOverflow | ||
sx={{ | ||
bgcolor: 'background.level1', | ||
px: 2, | ||
py: 1.5, | ||
m: 'calc(-1 * var(--ModalDialog-padding))', | ||
mt: 0, | ||
borderBottomLeftRadius: 'var(--ModalDialog-radius)', | ||
borderBottomRightRadius: 'var(--ModalDialog-radius)', | ||
textAlign: 'right', | ||
}} | ||
> | ||
<Button size="sm">Got it!</Button> | ||
</Box> | ||
<Divider inset="context" /> | ||
<DialogActions | ||
buttonFlex="none" | ||
sx={{ pt: 1.5, justifyContent: 'flex-start' }} | ||
> | ||
<Button size="sm">Got it!</Button> | ||
</DialogActions> | ||
</CardOverflow> | ||
</ModalDialog> | ||
); | ||
} |
36 changes: 16 additions & 20 deletions
36
docs/data/joy/components/divider/DividerInModalDialog.tsx
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,45 +1,41 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
import Button from '@mui/joy/Button'; | ||
import CardOverflow from '@mui/joy/CardOverflow'; | ||
import ModalDialog from '@mui/joy/ModalDialog'; | ||
import DialogTitle from '@mui/joy/DialogTitle'; | ||
import DialogContent from '@mui/joy/DialogContent'; | ||
import DialogActions from '@mui/joy/DialogActions'; | ||
import Divider from '@mui/joy/Divider'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function DividerInModalDialog() { | ||
return ( | ||
<ModalDialog | ||
aria-labelledby="divider-modal-title" | ||
aria-describedby="divider-modal-desc" | ||
sx={{ | ||
// this custom styles is for demonstration purpose, you might not need them in your app | ||
position: 'static', | ||
transform: 'none', | ||
maxWidth: 300, | ||
}} | ||
> | ||
<Typography fontSize="lg" fontWeight="lg" id="divider-modal-title"> | ||
Modal Title | ||
</Typography> | ||
<DialogTitle>Modal Title</DialogTitle> | ||
<Divider inset="none" /> | ||
<Typography level="body-sm" id="divider-modal-desc" fontSize="sm"> | ||
<DialogContent> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. | ||
Lorem Ipsum has been the industry standard dummy text ever since the 1500s | ||
</Typography> | ||
<Divider /> | ||
<Box | ||
</DialogContent> | ||
<CardOverflow | ||
sx={{ | ||
bgcolor: 'background.level1', | ||
px: 2, | ||
py: 1.5, | ||
m: 'calc(-1 * var(--ModalDialog-padding))', | ||
mt: 0, | ||
borderBottomLeftRadius: 'var(--ModalDialog-radius)', | ||
borderBottomRightRadius: 'var(--ModalDialog-radius)', | ||
textAlign: 'right', | ||
}} | ||
> | ||
<Button size="sm">Got it!</Button> | ||
</Box> | ||
<Divider inset="context" /> | ||
<DialogActions | ||
buttonFlex="none" | ||
sx={{ pt: 1.5, justifyContent: 'flex-start' }} | ||
> | ||
<Button size="sm">Got it!</Button> | ||
</DialogActions> | ||
</CardOverflow> | ||
</ModalDialog> | ||
); | ||
} |
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.