Skip to content

Commit

Permalink
✨ feat: Add enableResponsive to Modal
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed May 22, 2024
1 parent d9e4c7f commit dfe0542
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const useStyles = createStyles(

export type ModalProps = AntModalProps & {
allowFullscreen?: boolean;
enableResponsive?: boolean;
maxHeight?: string | number | false;
paddings?: {
desktop?: number;
Expand All @@ -98,6 +99,7 @@ const Modal = memo<ModalProps>(
destroyOnClose,
paddings,
maxHeight = '75dvh',
enableResponsive = true,
footer,
styles: stylesProps = {},
...rest
Expand All @@ -112,7 +114,7 @@ const Modal = memo<ModalProps>(
: undefined,
});
const { body, ...restStyles } = stylesProps;
if (mobile)
if (enableResponsive && mobile)
return (
<Drawer
className={cx(styles.drawerContent, className)}
Expand Down

0 comments on commit dfe0542

Please sign in to comment.