ant-design/components/color-picker/interface.ts
lijianan d3093c9096
style: optimize ColorPicker code (#42329)
* style: optimize ColorPicker code

* style: optimize ColorPicker code

* test
2023-05-13 23:05:26 +08:00

26 lines
561 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;
clearColor?: boolean;
disabled?: boolean;
presets?: PresetsItem[];
onFormatChange?: ColorPickerProps['onFormatChange'];
}