DocSpace-client/packages/asc-web-components/backdrop/styled-backdrop.js

24 lines
599 B
JavaScript
Raw Normal View History

import styled from "styled-components";
2021-02-25 21:19:45 +00:00
import Base from "../themes/base";
const StyledBackdrop = styled.div`
background-color: ${(props) =>
props.needBackground
? props.theme.backdrop.backgroundColor
: props.theme.backdrop.unsetBackgroundColor};
display: ${(props) => (props.visible ? "block" : "none")};
height: 100vh;
position: fixed;
width: 100vw;
z-index: ${(props) => props.zIndex};
left: 0;
top: 0;
cursor: ${(props) => (props.needBackground ? "pointer" : "default")}; ;
`;
StyledBackdrop.defaultProps = {
theme: Base,
};
export default StyledBackdrop;