mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 00:09:39 +08:00
e72a7836f4
* feat: implement onChangeComplete api * docs: add change completed demo * perf: optimization code
36 lines
835 B
TypeScript
36 lines
835 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 type TriggerType = 'click' | 'hover';
|
|
|
|
export type TriggerPlacement =
|
|
| 'top'
|
|
| 'topLeft'
|
|
| 'topRight'
|
|
| 'bottom'
|
|
| 'bottomLeft'
|
|
| 'bottomRight';
|
|
export interface ColorPickerBaseProps {
|
|
color?: Color;
|
|
prefixCls: string;
|
|
format?: keyof typeof ColorFormat;
|
|
allowClear?: boolean;
|
|
colorCleared?: boolean;
|
|
disabled?: boolean;
|
|
presets?: PresetsItem[];
|
|
panelRender?: ColorPickerProps['panelRender'];
|
|
onFormatChange?: ColorPickerProps['onFormatChange'];
|
|
onChangeComplete?: ColorPickerProps['onChangeComplete'];
|
|
}
|