Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import React from 'react'
import { StyledCell, StyledInnerCell } from './styled'
import { CellProps } from './typings'

class Cell extends React.PureComponent<CellProps> {
  static defaultProps = {
    // nowrap: true,
  }

  render() {
    const { children, colSpan, totalColumns, className, nowrap } = this.props
    const attributes = { className, colSpan, totalColumns }

    // @todo render prop
    const Box = nowrap ? React.Fragment : StyledInnerCell

    return (
      <StyledCell {...attributes}>
        <Box>{children}</Box>
      </StyledCell>
    )
  }
}

export { Cell }
export default Cell