Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{children}
);
Modal.Content = ModalContent;
Modal.Header = ModalHeader;
Modal.Footer = ModalFooter;
Modal.Close = ModalClose;
interface BaseModalBackgroundProps {
opacity?: number;
oversized?: boolean;
padding?: string;
}
const CustomModalBackground = styled(StyledReactModal.BaseModalBackground)`
box-sizing: border-box;
overflow-y: auto;
padding: ${({ padding = '2rem 1rem' }: BaseModalBackgroundProps) =>
padding};
background-color: ${({ opacity = 0.6 }: BaseModalBackgroundProps) =>
`rgba(0,0,0,${opacity})`};
`;
export const BaseModalBackground = CustomModalBackground;
export class ModalProvider extends StyledReactModal.ModalProvider {
static defaultProps = { backgroundComponent: BaseModalBackground };
}