Skip to content

Commit

Permalink
chore: update listbox layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kyledurand committed Mar 6, 2024
1 parent 3554a10 commit b4ef876
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@
.ActionDivider {
margin-bottom: var(--p-space-100);
}

.Icon {
padding-right: var(--p-space-200);
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,21 @@ export const TextOption = memo(function TextOption({
isAction && styles.isAction,
);

const optionMarkup = selected ? (
const placeholder = isAction ? null : <Box width="20px" />;

const optionMarkup = (
<Box width="100%">
<InlineStack wrap={false} align="space-between" gap="200">
<InlineStack wrap={false} gap="150">
{selected ? (
<span>
<Icon source={CheckIcon} />
</span>
) : (
placeholder
)}
{children}
<InlineStack align="end">
<Icon source={CheckIcon} />
</InlineStack>
</InlineStack>
</Box>
) : (
<>{children}</>
);

return (
Expand Down

0 comments on commit b4ef876

Please sign in to comment.