UNPKG

@hbsis.uikit/react

Version:
80 lines (69 loc) 1.67 kB
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