// @flow import React from 'react'; import styles from './ChartNode.css'; type Props = {| color: string, height: number, isDimmed?: boolean, label: string, onClick: (event: SyntheticMouseEvent<*>) => mixed, onDoubleClick?: (event: SyntheticMouseEvent<*>) => mixed, placeLabelAboveNode?: boolean, textStyle?: Object, width: number, x: number, y: number, |}; const minWidthToDisplay = 35; export default function ChartNode({ color, height, isDimmed = false, label, onClick, onDoubleClick, textStyle, width, x, y, }: Props) { return ( {label} {width >= minWidthToDisplay && (
{label}
)}
); }