Skip to content

Commit

Permalink
bump description to two lines and bolden name if descriptoin is prese…
Browse files Browse the repository at this point in the history
…nt (#35)

Co-authored-by: Mary Hipp <[email protected]>
  • Loading branch information
maryhipp and Mary Hipp authored Oct 24, 2024
1 parent 487905c commit 759942b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/components/combobox/custom-option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export const CustomOptionComponent = typedMemo(({ children, ...props }: CustomOp
{props.data.icon}
</Flex>
<Flex flexDir="column">
<Text>{children}</Text>
<Text fontWeight={props.data.description ? "semibold" : undefined}>{children}</Text>
{props.data.description && (
<Text data-option-desc fontSize="sm" colorScheme="base" variant="subtext" noOfLines={1}>
<Text data-option-desc fontSize="sm" colorScheme="base" variant="subtext" noOfLines={2}>
{props.data.description}
</Text>
)}
Expand All @@ -50,9 +50,9 @@ export const CustomOptionComponent = typedMemo(({ children, ...props }: CustomOp
<chakraComponents.Option {...props}>
<Tooltip label={props.data.tooltip}>
<Flex w="full" h="full" flexDir="column" p={1} px={4}>
<Text>{children}</Text>
<Text fontWeight={props.data.description ? "semibold" : undefined}>{children}</Text>
{props.data.description && (
<Text data-option-desc fontSize="sm" colorScheme="base" variant="subtext" noOfLines={1}>
<Text data-option-desc fontSize="sm" colorScheme="base" variant="subtext" noOfLines={2}>
{props.data.description}
</Text>
)}
Expand Down

0 comments on commit 759942b

Please sign in to comment.