UNPKG

@hbsis.uikit/react

Version:
40 lines (31 loc) 768 B
import styled from 'styled-components' const CardStyled = styled.div` position: relative; width: ${props => props.width}; border-radius: 2px; padding-top: 2px; display: flex; flex-flow: column; border: solid 1px #e1e3e7; box-sizing: border-box; ${p => p.withBorder && ` box-shadow: inset 0 2px 0 0 #afcef3; &.danger{ box-shadow: inset 0 2px 0 0 #de4246; } &.warning{ box-shadow: inset 0 2px 0 0 #ffc907; } &.success{ box-shadow: inset 0 2px 0 0 #8cc152; } &.custom{ box-shadow: inset 0 2px 0 0 ${p => p.color}; background:red; } `} ` CardStyled.defaultProps = { width: '360px' } export default CardStyled