Skip to content

Commit 7cfbfc9

Browse files
victoransel1plouc
authored andcommittedDec 17, 2021
fix(core): export linearGradientDef in typings
1 parent 7f68c58 commit 7cfbfc9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎packages/core/index.d.ts

+13
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,19 @@ declare module '@nivo/core' {
246246
| 'stepBefore'
247247

248248
export function useAnimatedPath(path: string): Interpolation<string>
249+
250+
export type GradientColor = {
251+
offset: number
252+
color: string
253+
opacity?: number
254+
}
255+
256+
export function linearGradientDef(id: string, colors: GradientColor[], options?: SVGProps<SVGLinearGradientElement>
257+
): {
258+
id: string
259+
type: 'linearGradient'
260+
colors: GradientColor[]
261+
} & SVGProps<SVGLinearGradientElement>
249262

250263
export type LinearGradientDef = {
251264
id: string

0 commit comments

Comments
 (0)
Please sign in to comment.