import * as React from 'react'; import { PureComponent } from 'react'; import { DatePickers } from '../common/types'; import noop from 'lodash-es/noop'; export interface ITimeCellProps { onSelect: (val) => void; cells: DatePickers.ITimeCellValue[][]; } export default class TimeCell extends PureComponent { static defaultProps = { onSelect: noop, }; onClickCell = cell => { !cell.isDisabled && this.props.onSelect(cell.value); }; getTbody() { const { cells } = this.props; return cells.map((row, i) => { const tds = row.map((col, j) => { return (
  • this.onClickCell(col)} className={col.className} title={`${col.value}`} > {col.text}
  • ); }); return ( ); }); } render() { return
    {this.getTbody()}
    ; } }