All files / components/modal modal.styled.js

0% Statements 0/10
0% Branches 0/8
0% Functions 0/4
0% Lines 0/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63                                                                                                                             
import styled from 'styled-components'
 
const ModalContainer = styled.div`
  position: relative;
  z-index: 1;
  visibility: ${props => props.visible ? 'visible' : 'hidden'};
 
  .modal-bg
  {
    background: #2c3848;
    position: fixed;
    display: flex;
    justify-content: center;
    top: 0px;
    width: 100%;
    height: 100vh;
    left: 0px;
    opacity: .9;
    z-index: 1000;
  }
 
  .modal-wrapper
  {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    z-index: 1001;
  }
 
  .modal
  {
    position: relative;
    background: #ffffff;
    width: ${props => props.size ? props.size : '500px'};
    opacity: 1;
    border-radius: 2px;
    z-index: 1001;
    display: flex;
    flex-flow: column;
    box-shadow: 4px 4px 10px rgba(34, 45, 60, 0.72);
  }
 
  .modal-close-trigger
  {
    position: absolute;
    right: -30px;
    top:10px;
    color: #fff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
`
 
export default ModalContainer