diff --git a/src/components/ModalWrapper.tsx b/src/components/ModalWrapper.tsx index 8a078276..9c00d8ab 100644 --- a/src/components/ModalWrapper.tsx +++ b/src/components/ModalWrapper.tsx @@ -2,18 +2,19 @@ import * as Dialog from '@radix-ui/react-dialog' import { type ReactNode, forwardRef } from 'react' -import styled, { useTheme } from 'styled-components' +import styled, { type CSSObject, useTheme } from 'styled-components' const ANIMATION_SPEED = '150ms' export type ModalWrapperProps = { open: boolean onOpenChange?: (open: boolean) => void + overlayStyles?: CSSObject children?: ReactNode } & Dialog.DialogContentProps function ModalWrapperRef( - { open, onOpenChange, children, ...props }: ModalWrapperProps, + { open, onOpenChange, overlayStyles, children, ...props }: ModalWrapperProps, ref: any ) { const theme = useTheme() @@ -25,7 +26,10 @@ function ModalWrapperRef( onOpenChange={onOpenChange} > - e.stopPropagation()}> + e.stopPropagation()} + style={overlayStyles} + >