import styled from 'styled-components'
import PropTypes from 'prop-types'
const StyledRow = styled.div`
> .rowListHeader {
font-size: 0.7rem;
color: #9ba2ac;
background: #FFF;
height: 31px;
display: flex;
align-items: center;
border-top: 1px dashed #c5d0e1;
border-bottom: 1px dashed #c5d0e1;
border-right: 1px dashed #c5d0e1;
padding-left: 4px;
font-weight: 600;
text-transform: uppercase;
margin: 0;
${props => props.withBorder && `
box-shadow: inset 4px 0 ${props.borderColor};
`}
.colList {
height: 100%;
display: flex;
align-items: center;
}
}
> .rowList {
font-size: 0.8rem;
background: #FFFFFF;
margin: 0;
border-right: 1px dashed #c5d0e1;
${props => props.withHover && `
cursor: pointer;
`}
.colList {
min-height: 60px;
display: flex;
align-items: center;
}
padding-left: 4px;
border-bottom: 1px dashed #c5d0e1;
${props => props.withBorder && `
box-shadow: inset 4px 0 ${props.borderColor};
`}
${props => props.withHover && `
&:hover {
background: #f4f5f8;
${props.withBorder && `
box-shadow: inset 4px 0 ${props.borderColorHover};
`}
}
`}
}
`
StyledRow.defaultProps = {
withBorder: true,
withHover: true,
borderColor: '#afcef3',
borderColorHover: '#2870b2'
}
StyledRow.propTypes = {
withBorder: PropTypes.bool,
withHover: PropTypes.bool,
borderColor: PropTypes.string,
borderColorHover: PropTypes.string
}
export default StyledRow
|