UNPKG

969 BTypeScriptView Raw
1import { Component, CSSProperties } from "react";
2import { ColorPickerProps, ColorResult } from "../../..";
3import { Classes } from "reactcss";
4
5export interface SketchPickerStylesProps {
6 picker: CSSProperties;
7 saturation: CSSProperties;
8 Saturation: CSSProperties;
9 controls: CSSProperties;
10 sliders: CSSProperties;
11 color: CSSProperties;
12 activeColor: CSSProperties;
13 hue: CSSProperties;
14 Hue: CSSProperties;
15 alpha: CSSProperties;
16 Alpha: CSSProperties;
17}
18
19export type PresetColor = { color: string; title: string } | string;
20export interface SketchPickerProps extends ColorPickerProps<SketchPicker> {
21 disableAlpha?: boolean | undefined;
22 presetColors?: PresetColor[] | undefined;
23 width?: string | undefined;
24 styles?: Partial<Classes<SketchPickerStylesProps>> | undefined;
25 onSwatchHover?(color: ColorResult, event: MouseEvent): void;
26}
27
28export default class SketchPicker extends Component<SketchPickerProps> { }