mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-19 06:43:16 +08:00
chore: enhance PanelPresets type (#43486)
* docs: update examples link * type: fix typescript error * chore: code clean
This commit is contained in:
parent
a5fa9e2742
commit
36f195d411
@ -12,11 +12,9 @@ export interface PanelPresetsProps extends Pick<ColorPickerBaseProps, 'prefixCls
|
||||
|
||||
const PanelPresets: FC = () => {
|
||||
const { prefixCls, value, presets, onChange } = useContext(PanelPresetsContext);
|
||||
return (
|
||||
Array.isArray(presets) && (
|
||||
<ColorPresets value={value} presets={presets} prefixCls={prefixCls} onChange={onChange} />
|
||||
)
|
||||
);
|
||||
return Array.isArray(presets) ? (
|
||||
<ColorPresets value={value} presets={presets} prefixCls={prefixCls} onChange={onChange} />
|
||||
) : null;
|
||||
};
|
||||
|
||||
export default PanelPresets;
|
||||
|
Loading…
Reference in New Issue
Block a user