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 {
isOpen: boolean;
setIsOpen: Dispatcher<boolean>;
children: React.ReactNode;
customStyle: { backgroundColor?: string; padding?: string };
customStyle: { backgroundColor?: string; padding?: string; width?: string };
}
const useStyles = makeStyles((theme) => ({
modal: {
modal: (customStyle: ICustomModalProps['customStyle']) => ({
backgroundColor: 'transparent',
margin: '7% auto',
padding: 'none',
border: 'none',
width: '85%',
[theme.breakpoints.down('sm')]: {
width: customStyle.width || '85%',
[theme.breakpoints.down(700)]: {
margin: '3% auto',
width: '95%',
},
},
}),
modalContent: (customStyle: ICustomModalProps['customStyle']) => ({
...{
backgroundColor: customStyle.backgroundColor || 'theme.palette.background.paper',
......
......@@ -14,7 +14,7 @@ export const ProfileModal = ({ isOpen, setIsOpen }: IProfileModalProps) => {
<CustomModal
isOpen={isOpen}
setIsOpen={setIsOpen}
customStyle={{ backgroundColor: 'white', padding: '10px' }}
customStyle={{ backgroundColor: 'white', padding: '10px', width: '650px' }}
>
{placeHolder}
</CustomModal>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment