ant-design/components/color-picker/interface.ts
红果汁 2722850c0d
chore: sync @rc-component/color-picker@1.1.0 (#42445)
* 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>
2023-05-18 13:34:06 +08:00

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'];
}