@bigfishtv/cockpit
Version:
16 lines (13 loc) • 444 B
JavaScript
import React, { Component } from 'react'
import { Cell } from 'fixed-data-table'
import Icon from '../../Icon'
/**
* Table cell for displaying a boolean value
*/
export default class FixedDataTableCheckboxCell extends Component {
render() {
const { data, rowIndex, columnKey, ...props } = this.props
const value = data[rowIndex][columnKey] ? true : false
return <Cell {...props}>{value && <Icon name="tick" size={12} />}</Cell>
}
}