reaviz
Version:
Data Visualization using React
19 lines (17 loc) • 431 B
TypeScript
import { MouseEvent } from 'react';
import { ChartInternalDataShape } from './data';
/**
* branch between showing something and providing a spec,
* or not showing it
*/
export type Visible<T> = {
show: true;
} & T;
export type Invisible<T> = {
show: false;
} & Partial<T>;
export type Shown<T> = Visible<T> | Invisible<T>;
export interface ClickEvent {
value: ChartInternalDataShape;
nativeEvent: MouseEvent;
}