From 7cfbfc9623631cd94e165f25a1919cf9019dbdb3 Mon Sep 17 00:00:00 2001 From: Victor Ansel <94275410+victoransel1@users.noreply.github.com> Date: Sun, 14 Nov 2021 01:58:55 -0300 Subject: [PATCH] fix(core): export linearGradientDef in typings --- packages/core/index.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/core/index.d.ts b/packages/core/index.d.ts index 6a94e3ff0f..5b743d9b1b 100644 --- a/packages/core/index.d.ts +++ b/packages/core/index.d.ts @@ -246,6 +246,19 @@ declare module '@nivo/core' { | 'stepBefore' export function useAnimatedPath(path: string): Interpolation + + export type GradientColor = { + offset: number + color: string + opacity?: number + } + + export function linearGradientDef(id: string, colors: GradientColor[], options?: SVGProps + ): { + id: string + type: 'linearGradient' + colors: GradientColor[] + } & SVGProps export type LinearGradientDef = { id: string