From 1750adb03f7e3784e2cd1050a78c8032d8665ec2 Mon Sep 17 00:00:00 2001 From: monicawoj Date: Wed, 15 Mar 2023 14:53:37 +0100 Subject: [PATCH] fix panel and vis type selectors --- .../shared/components/src/Select/index.tsx | 177 +++++++++--------- 1 file changed, 84 insertions(+), 93 deletions(-) diff --git a/ui/packages/shared/components/src/Select/index.tsx b/ui/packages/shared/components/src/Select/index.tsx index 7730e99d7b9..e8e771a4c13 100644 --- a/ui/packages/shared/components/src/Select/index.tsx +++ b/ui/packages/shared/components/src/Select/index.tsx @@ -69,101 +69,92 @@ const Select = ({ 'relative text-gray-100 dark-gray-900 justify-center bg-indigo-600 border border-indigo-500 font-medium py-2 px-4 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm text-sm'; return ( - <> - - {({open}) => ( - <> -
- 0} - )} - > - - {/* SLOT */} - - {selection?.key !== '' ? selection.element.active : placeholder} - - - - - - - - - {loading === true ? ( -
-
{loader}
-
- ) : ( - <> - {items.length > 0 && ( -
- {items.map(option => ( - - cx( - active && 'text-white bg-indigo-600', - 'cursor-default select-none relative py-2 pl-3 pr-9', - disabled && 'opacity-50' - ) - } - value={option.key} - > - {({selected, active}) => ( - <> -
- - {option.element.expanded} - -
- {selected ? ( - - - ) : null} - - )} -
- ))} -
+ + {({open}) => ( +
+ 0} + )} + > + + + {selection?.key !== '' ? selection.element.active : placeholder} + + + + + + + + {loading === true ? ( +
+
{loader}
+
+ ) : ( + <> + {items.length > 0 && ( +
+ > + {items.map(option => ( + + cx( + active && 'text-white bg-indigo-600', + 'cursor-default select-none relative py-2 pl-3 pr-9', + disabled && 'opacity-50' + ) + } + value={option.key} + > + {({selected, active}) => ( + <> +
+ + {option.element.expanded} + +
+ {selected ? ( + + + ) : null} + + )} +
+ ))} +
)} -
-
-
- - )} -
- + + )} +
+
+
+ )} +
); };