move z-index setting to zero instant container, and add ability for zindex to be set on container

This commit is contained in:
Steve Klebanoff
2018-10-15 14:04:53 -07:00
parent 7325e16698
commit f13d061dd2
3 changed files with 10 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ export interface ContainerProps {
className?: string;
backgroundColor?: ColorOption;
hasBoxShadow?: boolean;
zIndex?: number;
}
const PlainContainer: React.StatelessComponent<ContainerProps> = ({ children, className }) => (
@@ -52,6 +53,7 @@ export const Container = styled(PlainContainer)`
${props => cssRuleIfExists(props, 'border')}
${props => cssRuleIfExists(props, 'border-top')}
${props => cssRuleIfExists(props, 'border-bottom')}
${props => cssRuleIfExists(props, 'z-index')}
${props => (props.hasBoxShadow ? `box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1)` : '')};
background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')};
border-color: ${props => (props.borderColor ? props.theme[props.borderColor] : 'none')};