react-linear-gradient-picker
Version:
React linear gradient picker
20 lines (19 loc) • 503 B
TypeScript
import { GradientCoordinates } from './geometry';
export declare const GRADIENT_TYPES: {
readonly LINEAR: "linear";
readonly RADIAL: "radial";
};
export type GradientType = (typeof GRADIENT_TYPES)[keyof typeof GRADIENT_TYPES];
export interface GradientConfig {
angle: number;
stops: Array<{
color: string;
offset: number;
}>;
type: GradientType;
}
export interface GradientPreview {
background: string;
angle: number;
gradient: GradientCoordinates;
}