All files / components/blankslate blankslate.styled.js

0% Statements 0/22
0% Branches 0/16
0% Functions 0/8
0% Lines 0/14
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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80                                                                                                                                                               
import styled from 'styled-components'
import PropTypes from 'prop-types'
 
const BlankSlateStyled = styled.div`
  display: ${p => p.visible ? 'flex' : 'none'};
  align-items: center;
  background: red;
  ${p => {
    if (p.orientation === 'ltr') { return `padding-left: 105px;` } else { return `padding-right: 105px;` }
  }}
  margin:10px auto;
  max-width:1024px;
  padding-top: 78px;
  padding-bottom: 76px;
  border-radius: 2px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(51, 60, 72, 0.3);
  flex-flow:${p => p.orientation === 'ltr' ? 'row' : 'row-reverse'};
 
  .blankslate-img
  {
    max-width:100%;
  }
 
  .blankslate-label-container
  {
    display: flex;
    flex-flow: column;
    align-items: ${p => p.orientation === 'ltr' ? 'flex-start' : 'flex-end'};
    text-align:${p => p.orientation === 'ltr' ? 'left' : 'right'};
 
    ${p => {
    if (p.orientation === 'ltr') {
      return `
            padding-right: 97px;
            margin-left:90px;
      `
    } else {
      return `
            margin-right:90px;
            padding-left: 97px;
      `
    }
  }};
 
    > h2
    {
      font-size: 24px;
      color: #2870b2;
      margin:0px;
    }
 
    > p
    {
      font-size: 16px;
      line-height: 1.88;
      color: #3b495e;
      margin-top: 25px;
      margin-bottom: 50px;
    }
 
    > button
    {
      margin:0px;
    }
  }
`
 
BlankSlateStyled.defaultProps = {
  visible: PropTypes.bool.isRequired,
  orientation: PropTypes.string.isRequired
}
 
BlankSlateStyled.PropTypes = {
  visible: false,
  orientation: 'ltr'
}
 
export default BlankSlateStyled