mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 22:39:34 +08:00
2722850c0d
* fix: sync @rc-component/color-picker@1.1.0 * Update package.json Co-authored-by: afc163 <afc163@gmail.com> --------- Co-authored-by: lijianan <574980606@qq.com> Co-authored-by: afc163 <afc163@gmail.com>
34 lines
727 B
TypeScript
34 lines
727 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[];
|
|
onFormatChange?: ColorPickerProps['onFormatChange'];
|
|
}
|