From 36f195d41113fb52b8ec7cb756e0cb1d0658637d Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Tue, 11 Jul 2023 22:36:40 +0800 Subject: [PATCH] chore: enhance PanelPresets type (#43486) * docs: update examples link * type: fix typescript error * chore: code clean --- components/color-picker/components/PanelPresets.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/color-picker/components/PanelPresets.tsx b/components/color-picker/components/PanelPresets.tsx index 344e8b3d73..b978df408a 100644 --- a/components/color-picker/components/PanelPresets.tsx +++ b/components/color-picker/components/PanelPresets.tsx @@ -12,11 +12,9 @@ export interface PanelPresetsProps extends Pick { const { prefixCls, value, presets, onChange } = useContext(PanelPresetsContext); - return ( - Array.isArray(presets) && ( - - ) - ); + return Array.isArray(presets) ? ( + + ) : null; }; export default PanelPresets;