mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-11 23:00:20 +08:00
7183eab0a9
* feat: close panel when click clear button * feat: optimize code * feat: optimize code * feat: optimize code
26 lines
563 B
TypeScript
26 lines
563 B
TypeScript
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;
|
|
colorCleared?: boolean;
|
|
disabled?: boolean;
|
|
presets?: PresetsItem[];
|
|
onFormatChange?: ColorPickerProps['onFormatChange'];
|
|
}
|