diff --git a/app/src/molecules/BackgroundOverlay/index.tsx b/app/src/molecules/BackgroundOverlay/index.tsx index 5c820c9e27f2..fcc8956e423f 100644 --- a/app/src/molecules/BackgroundOverlay/index.tsx +++ b/app/src/molecules/BackgroundOverlay/index.tsx @@ -1,6 +1,15 @@ import * as React from 'react' +import { css } from 'styled-components' + import { COLORS, Flex, POSITION_FIXED } from '@opentrons/components' +const BACKGROUND_OVERLAY_STYLE = css` + position: ${POSITION_FIXED}; + inset: 0; + z-index: 3; + background-color: ${COLORS.black90}${COLORS.opacity60HexCode}; +` + export interface BackgroundOverlayProps extends React.ComponentProps { // onClick handler so when you click anywhere in the overlay, the modal/menu closes @@ -13,13 +22,7 @@ export function BackgroundOverlay(props: BackgroundOverlayProps): JSX.Element { return ( diff --git a/app/src/molecules/LegacyModal/LegacyModalShell.tsx b/app/src/molecules/LegacyModal/LegacyModalShell.tsx index 715817814e99..f8b7ea891216 100644 --- a/app/src/molecules/LegacyModal/LegacyModalShell.tsx +++ b/app/src/molecules/LegacyModal/LegacyModalShell.tsx @@ -84,10 +84,6 @@ const Overlay = styled.div` z-index: 1; background-color: ${COLORS.black90}${COLORS.opacity40HexCode}; cursor: default; - - @media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} { - background-color: ${COLORS.grey50}; - } ` const ContentArea = styled.div<{ zIndex: string | number }>` display: flex; diff --git a/app/src/molecules/LegacyModal/index.tsx b/app/src/molecules/LegacyModal/index.tsx index b6e9b5140937..03c9dd1d72f2 100644 --- a/app/src/molecules/LegacyModal/index.tsx +++ b/app/src/molecules/LegacyModal/index.tsx @@ -19,6 +19,9 @@ export interface LegacyModalProps extends StyleProps { footer?: React.ReactNode } +/** + * For Desktop app use only. + */ export const LegacyModal = (props: LegacyModalProps): JSX.Element => { const { type = 'info', diff --git a/app/src/molecules/Modal/Modal.tsx b/app/src/molecules/Modal/Modal.tsx index 4b5b5ad39eaf..3b8ec0464fda 100644 --- a/app/src/molecules/Modal/Modal.tsx +++ b/app/src/molecules/Modal/Modal.tsx @@ -24,6 +24,9 @@ interface ModalProps extends StyleProps { /** see ModalHeader component for more details */ header?: ModalHeaderBaseProps } +/** + * For ODD use only. + */ export function Modal(props: ModalProps): JSX.Element { const { modalSize = 'medium', diff --git a/components/src/modals/ModalShell.tsx b/components/src/modals/ModalShell.tsx index 6488db16b242..62bb638e4d14 100644 --- a/components/src/modals/ModalShell.tsx +++ b/components/src/modals/ModalShell.tsx @@ -1,6 +1,6 @@ import * as React from 'react' import styled from 'styled-components' -import { BORDERS, RESPONSIVENESS, SPACING } from '../ui-style-constants' +import { BORDERS, SPACING } from '../ui-style-constants' import { COLORS } from '../helix-design-system' import { StyleProps, styleProps } from '../primitives' import { @@ -78,13 +78,10 @@ const Overlay = styled.div` top: 0; bottom: 0; z-index: 1; - background-color: ${COLORS.black90}${COLORS.opacity40HexCode}; + background-color: ${COLORS.black90}${COLORS.opacity60HexCode}; cursor: default; - - @media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} { - background-color: ${COLORS.grey50}; - } ` + const ContentArea = styled.div<{ zIndex: string | number }>` display: flex; position: ${POSITION_ABSOLUTE};