diff --git a/lib/components/modal-overlay.css b/lib/components/modal-overlay.css --- a/lib/components/modal-overlay.css +++ b/lib/components/modal-overlay.css @@ -5,7 +5,6 @@ height: 100%; z-index: 4; width: 100%; - background-color: #000000e6; display: flex; flex-direction: column; align-items: center; diff --git a/lib/components/modal-overlay.react.js b/lib/components/modal-overlay.react.js --- a/lib/components/modal-overlay.react.js +++ b/lib/components/modal-overlay.react.js @@ -9,10 +9,16 @@ +onClose: () => void, +children?: React.Node, +disableAutoFocus?: boolean, + +backgroundColor?: string, }; function ModalOverlay(props: ModalOverlayProps): React.Node { - const { children, onClose, disableAutoFocus } = props; + const { + children, + onClose, + disableAutoFocus, + backgroundColor = 'var(--modal-overlay-background-90)', + } = props; const overlayRef = React.useRef(); const firstClickRef = React.useRef(null); @@ -48,6 +54,13 @@ [onClose], ); + const containerStyle = React.useMemo( + () => ({ + backgroundColor: backgroundColor, + }), + [backgroundColor], + ); + return (