Skip to content

Commit daa2a10

Browse files
authored
ColorPicker.Dialog exporting ColorPickerDialog (#3324)
* ColorPicker.Dialog exporting ColorPickerDialog * ColorPicker use ComponentStatics
1 parent 6d763ac commit daa2a10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/colorPicker/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Button from '../button';
88
import ColorPalette, {ColorPaletteProps} from '../colorPalette';
99
import {SWATCH_MARGIN, SWATCH_SIZE} from '../colorSwatch';
1010
import ColorPickerDialog, {ColorPickerDialogProps} from './ColorPickerDialog';
11+
import type {ComponentStatics} from '../../typings/common';
1112

1213
interface Props extends ColorPickerDialogProps, Pick<ColorPaletteProps, 'onValueChange'> {
1314
/**
@@ -117,8 +118,9 @@ const ColorPicker = (props: Props) => {
117118
};
118119

119120
ColorPicker.displayName = 'ColorPicker';
121+
ColorPicker.Dialog = ColorPickerDialog;
120122

121-
export default asBaseComponent<Props>(ColorPicker);
123+
export default asBaseComponent<Props, ComponentStatics<typeof ColorPicker>>(ColorPicker);
122124

123125
const plusButtonContainerWidth = SWATCH_SIZE + 20 + 12;
124126
const plusButtonContainerHeight = 92 - 2 * SWATCH_MARGIN;

0 commit comments

Comments
 (0)