Skip to content
Snippets Groups Projects
Commit c7fcddcf authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

better modal breakpoint

parent 0663b219
No related branches found
No related tags found
2 merge requests!7update master to dev,!4Feature/profile
...@@ -8,21 +8,21 @@ interface ICustomModalProps { ...@@ -8,21 +8,21 @@ interface ICustomModalProps {
isOpen: boolean; isOpen: boolean;
setIsOpen: Dispatcher<boolean>; setIsOpen: Dispatcher<boolean>;
children: React.ReactNode; children: React.ReactNode;
customStyle: { backgroundColor?: string; padding?: string }; customStyle: { backgroundColor?: string; padding?: string; width?: string };
} }
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme) => ({
modal: { modal: (customStyle: ICustomModalProps['customStyle']) => ({
backgroundColor: 'transparent', backgroundColor: 'transparent',
margin: '7% auto', margin: '7% auto',
padding: 'none', padding: 'none',
border: 'none', border: 'none',
width: '85%', width: customStyle.width || '85%',
[theme.breakpoints.down('sm')]: { [theme.breakpoints.down(700)]: {
margin: '3% auto', margin: '3% auto',
width: '95%', width: '95%',
}, },
}, }),
modalContent: (customStyle: ICustomModalProps['customStyle']) => ({ modalContent: (customStyle: ICustomModalProps['customStyle']) => ({
...{ ...{
backgroundColor: customStyle.backgroundColor || 'theme.palette.background.paper', backgroundColor: customStyle.backgroundColor || 'theme.palette.background.paper',
......
...@@ -14,7 +14,7 @@ export const ProfileModal = ({ isOpen, setIsOpen }: IProfileModalProps) => { ...@@ -14,7 +14,7 @@ export const ProfileModal = ({ isOpen, setIsOpen }: IProfileModalProps) => {
<CustomModal <CustomModal
isOpen={isOpen} isOpen={isOpen}
setIsOpen={setIsOpen} setIsOpen={setIsOpen}
customStyle={{ backgroundColor: 'white', padding: '10px' }} customStyle={{ backgroundColor: 'white', padding: '10px', width: '650px' }}
> >
{placeHolder} {placeHolder}
</CustomModal> </CustomModal>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment