-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
add: custom modal added
- Loading branch information
Showing
10 changed files
with
81 additions
and
4 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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use client'; | ||
import { useBreakPoint, useLayout, usePalette } from '@/hooks'; | ||
import { Grow, Modal, Paper } from '@mui/material'; | ||
|
||
export const MainCustomModal = () => { | ||
const breakpoint = useBreakPoint(); | ||
const palette = usePalette(); | ||
const { isCustomModal, setIsCustomModal } = useLayout(); | ||
|
||
return ( | ||
<Modal | ||
open={isCustomModal} | ||
onClose={() => setIsCustomModal(false)} | ||
sx={{ | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: ['xs', 'sm'].includes(breakpoint) ? 'center' : 'start', | ||
}} | ||
> | ||
<Grow in={isCustomModal} timeout={200}> | ||
<Paper | ||
sx={{ | ||
position: 'relative', | ||
backgroundColor: palette.layout.mainLayout.customModal.bg, | ||
width: ['xs', 'sm'].includes(breakpoint) ? '100vw' : '800px', | ||
height: ['xs', 'sm'].includes(breakpoint) | ||
? '100vh' | ||
: 'calc(100vh - 90px)', | ||
maxHeight: '800px', | ||
marginTop: ['xs', 'sm'].includes(breakpoint) ? '0px' : '60px', | ||
borderRadius: ['xs', 'sm'].includes(breakpoint) ? '0px' : '0px', | ||
overflow: 'hidden', | ||
}} | ||
></Paper> | ||
</Grow> | ||
</Modal> | ||
); | ||
}; |
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