You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import type { ReactNode } from 'react';
|
|
|
|
import type { ColorPickerProps } from './ColorPicker';
|
|
|
|
import type { Color } from './color';
|
|
|
|
|
|
|
|
export enum ColorFormat {
|
|
|
|
hex = 'hex',
|
|
|
|
rgb = 'rgb',
|
|
|
|
hsb = 'hsb',
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface PresetsItem {
|
|
|
|
label: ReactNode;
|
|
|
|
colors: (string | Color)[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ColorPickerBaseProps {
|
|
|
|
color?: Color;
|
|
|
|
prefixCls: string;
|
|
|
|
format?: keyof typeof ColorFormat;
|
|
|
|
allowClear?: boolean;
|
|
|
|
clearColor?: boolean;
|
|
|
|
disabled?: boolean;
|
|
|
|
presets?: PresetsItem[];
|
|
|
|
onFormatChange?: ColorPickerProps['onFormatChange'];
|
|
|
|
}
|