From 20960d72387d35e5b43b15908ed8c412942fc0fa Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Wed, 29 Mar 2023 15:41:49 -0400 Subject: [PATCH] Improve UI of List component --- app/soapbox/components/list.tsx | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/app/soapbox/components/list.tsx b/app/soapbox/components/list.tsx index b48b24a87..ee04b2d92 100644 --- a/app/soapbox/components/list.tsx +++ b/app/soapbox/components/list.tsx @@ -4,8 +4,7 @@ import { v4 as uuidv4 } from 'uuid'; import { SelectDropdown } from '../features/forms'; -import Icon from './icon'; -import { HStack, Select } from './ui'; +import { Icon, HStack, Select } from './ui'; interface IList { children: React.ReactNode @@ -58,13 +57,13 @@ const ListItem: React.FC = ({ label, hint, children, onClick, onSelec return (
- {label} + {label} {hint ? ( {hint} @@ -83,12 +82,26 @@ const ListItem: React.FC = ({ label, hint, children, onClick, onSelec
{children} - {isSelected ? ( +
- ) : null} +
) : null}