Skip to content

Commit

Permalink
🐛Chip: only hover when clickable (error variant) (#3096)
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvernes authored Oct 9, 2023
1 parent 890017b commit b42752d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/eds-core-react/src/components/Chip/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const StyledChips = styled.div.attrs<StyleProps>(
}
`}
${({ $variant }) => {
${({ $variant, $clickable }) => {
switch ($variant) {
case 'active':
return css`
Expand All @@ -90,11 +90,12 @@ const StyledChips = styled.div.attrs<StyleProps>(
${bordersTemplate(error.border)};
@media (hover: hover) and (pointer: fine) {
&:hover {
border-color: ${error.states.hover.typography.color};
color: ${error.states.hover.typography.color};
border-color: ${$clickable &&
error.states.hover.typography.color};
color: ${$clickable && error.states.hover.typography.color};
svg {
fill: ${error.states.hover.typography.color};
fill: ${$clickable && error.states.hover.typography.color};
}
}
}
Expand Down

0 comments on commit b42752d

Please sign in to comment.