Skip to content

Commit

Permalink
feat(modal): made blur div optional
Browse files Browse the repository at this point in the history
  • Loading branch information
nchhibbaTelus committed Nov 13, 2024
1 parent 162d983 commit a687797
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/Modal/Modal.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export interface Props extends ReactModalProps {
* @default false
**/
disableCloseIcon: boolean;
/**
* adds blur effect at the bottom
* @default true
**/
blurEffect?: boolean;
}

const modalSizeRules: Function = (modalSize: string, theme: any) => {
Expand Down Expand Up @@ -261,6 +266,7 @@ export class Modal extends React.Component<Props> {
children,
modalTitle,
footerContent,
blurEffect = true,
...props
} = this.props;
return (
Expand Down Expand Up @@ -295,9 +301,13 @@ export class Modal extends React.Component<Props> {
</ModalHeaderDiv>
)}
<ModalBodyDiv>{children}</ModalBodyDiv>
<ModalBlurWrapper>
<ModalBlurDiv />
</ModalBlurWrapper>
{blurEffect ? (
<ModalBlurWrapper>
<ModalBlurDiv />
</ModalBlurWrapper>
) : (
''
)}
{footerContent && (
<ModalFooterDiv modalTitle={modalTitle}>
{footerContent}
Expand Down

0 comments on commit a687797

Please sign in to comment.