Skip to content

Commit

Permalink
fix(Combobox/Select:): Fix focus color for selected items when using …
Browse files Browse the repository at this point in the history
…`isMulti` + `isInverse` (#1570)
  • Loading branch information
silvalaura authored Nov 20, 2024
1 parent b2d3ac3 commit cf959a5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/selecteItemButton-focus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-magma-dom': patch
---

fix(Combobox/Select:): Fix focus color for selected items when using `isMulti` + `isInverse`
16 changes: 13 additions & 3 deletions packages/react-magma-dom/src/components/Select/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ export const SelectText = styled.span<{
: props.theme.colors.neutral500;
}
}};
${props => props.isDisabled && props.isShowPlaceholder && css`
opacity: ${props.isInverse ? 0.4 : 0.6}
`}
${props =>
props.isDisabled &&
props.isShowPlaceholder &&
css`
opacity: ${props.isInverse ? 0.4 : 0.6};
`}
`;

export const StyledCard = styled(Card)<{
Expand Down Expand Up @@ -169,6 +172,13 @@ export const SelectedItemButton = styled.button<{
white-space: nowrap;
min-width: 0%;
outline-offset: 2px;
&:focus {
outline: 2px solid
${props =>
props.isInverse
? props.theme.colors.focusInverse
: props.theme.colors.focus};
}
`;

export const IconWrapper = styled.span`
Expand Down

2 comments on commit cf959a5

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.