UNPKG

rumble-charts

Version:

Truly declarative React charts components

42 lines (41 loc) 1 kB
import type { ReactElement, ReactNode } from 'react'; import type { Size } from './types'; export declare type GradientProps = { id?: string; idPrefix?: string; type?: 'linear' | 'radial'; spreadMethod?: 'pad' | 'repeat' | 'reflect'; gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox'; gradientTransform?: string; /** * For type=linear */ from?: [Size, Size]; /** * For type=linear */ to?: [Size, Size]; x1?: Size; y1?: Size; x2?: Size; y2?: Size; /** * For type=radial */ center?: [Size, Size]; /** * For type=radial */ focalPoint?: [Size, Size]; cx?: Size; cy?: Size; fx?: Size; fy?: Size; r?: Size; radius?: Size; children?: ReactNode; }; /** * Wrapper around standard svg linearGradient and radialGradient. */ export declare function Gradient({ type, idPrefix, gradientUnits, spreadMethod, from, to, center, ...props }: GradientProps): ReactElement;