Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_renderCell = (cell: BT$BodyCellType, columnIndex: number, artifactName: string, isHovered: boolean) => {
const { color, isActive, onCellClick, onToggleArtifact, valueType } = this.props;
const hoverColor = hsl(color);
hoverColor.s = 0.7;
hoverColor.l = 0.95;
switch (cell && cell.type) {
case CellType.ARTIFACT:
return (
);
case CellType.DELTA: {
// $FlowFixMe
const deltaCell = (cell: BT$DeltaCellType);
return (
_renderTotalCell = (
cell: BT$BodyCellType,
cellIndex: number,
rowIndex?: number,
cellText?: string,
style?: mixed
) => {
const { activeArtifactNames, artifactNames, valueType } = this.props;
// $FlowFixMe
const text = cellText || (cell.hasOwnProperty('text') ? cell.text : '');
const cellStyles = rowIndex ? [styles.header, { top: getHeaderTopPos(rowIndex) }, style] : undefined;
switch (cell.type) {
case CellType.ARTIFACT:
return (
);
case CellType.TEXT:
return (
const mapBodyCell = (cell: ACell | TCell | TDCell | DCell, i: number): React.ReactElement | void => {
switch (cell.type) {
case CellType.ARTIFACT: {
return (
);
}
case CellType.DELTA:
return ;
case CellType.TOTAL:
return ;