Hide X when small

This commit is contained in:
Steve Klebanoff
2018-11-06 14:26:15 -08:00
parent eb3fda059a
commit d941901e32
2 changed files with 3 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ import { ColorOption, styled } from '../../style/theme';
import { cssRuleIfExists } from '../../style/util';
export interface ContainerProps {
display?: string;
display?: MediaChoice;
position?: string;
top?: string;
right?: string;
@@ -45,7 +45,6 @@ export const Container =
`
box-sizing: border-box;
${props => cssRuleIfExists(props, 'flex-grow')}
${props => cssRuleIfExists(props, 'display')}
${props => cssRuleIfExists(props, 'position')}
${props => cssRuleIfExists(props, 'top')}
${props => cssRuleIfExists(props, 'right')}
@@ -68,6 +67,7 @@ export const Container =
${props => cssRuleIfExists(props, 'cursor')}
${props => cssRuleIfExists(props, 'overflow')}
${props => (props.hasBoxShadow ? `box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1)` : '')};
${props => stylesForMedia('display', props.display || 'initial')}
${props => stylesForMedia('width', props.width || 'auto')}
${props => stylesForMedia('height', props.height || 'auto')}
background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')};

View File

@@ -15,7 +15,7 @@ export interface OverlayProps {
const PlainOverlay: React.StatelessComponent<OverlayProps> = ({ children, className, onClose }) => (
<Flex height="100vh" className={className}>
<Container position="absolute" top="0px" right="0px">
<Container position="absolute" top="0px" right="0px" display={{ default: 'initial', sm: 'none' }}>
<Icon height={18} width={18} color={ColorOption.white} icon="closeX" onClick={onClose} padding="2em 2em" />
</Container>
<Container width={{ default: 'auto', sm: '100%' }} height={{ default: 'auto', sm: '100%' }}>