All files / widgets/data-table/col index.js

0% Statements 0/21
0% Branches 0/8
0% Functions 0/5
0% Lines 0/9
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                                                       
import React from 'react'
import css from 'classnames'
import styled from 'styled-components'
 
const ColStyled = styled.div`
  display: flex;
  align-items: center;
  padding-left: 10px;
  width:${p=>p.width};
 
  ${p=>{
    if(p.bordered)
      return 'border-right: 1px dashed #c5d0e1;'
  }}
 
  &:last-child{
    border-right: none;
  }
`
 
const Col = ({ children, width, bordered = false }) => (
  <ColStyled bordered={bordered} width={width} >
    {children}
  </ColStyled>
)
 
export default Col