From 2551b4d500e26c18172f1e5a077f38edab4c4608 Mon Sep 17 00:00:00 2001 From: Sebastian Frysztak Date: Sun, 24 Feb 2019 22:52:38 +0100 Subject: [PATCH] Add (data, active) alternative to VictoryScatter --- types/victory/index.d.ts | 2 +- types/victory/victory-tests.tsx | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/types/victory/index.d.ts b/types/victory/index.d.ts index f5c67995da..549e3823da 100644 --- a/types/victory/index.d.ts +++ b/types/victory/index.d.ts @@ -2057,7 +2057,7 @@ declare module "victory" { /** * The size prop determines how to scale each data point */ - size?: number | { (data: any): number }; + size?: number | { (data: any): number } | { (data: any, active: boolean): number }; /** * The style prop specifies styles for your VictoryScatter. Any valid inline style properties * will be applied. Height, width, and padding should be specified via the height, diff --git a/types/victory/victory-tests.tsx b/types/victory/victory-tests.tsx index fcd18571e3..eb3b7bda40 100644 --- a/types/victory/victory-tests.tsx +++ b/types/victory/victory-tests.tsx @@ -642,6 +642,32 @@ test = ( /> ); +test = ( + 5} + /> +); + +test = ( + (a ? 5 : 3)} + /> +); + // VictoryPie test test = (