Skip to content

Commit

Permalink
fixed icon styles and disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinaKozlova committed Feb 14, 2025
1 parent 306c796 commit 1ccba12
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,16 @@ const useRootStyles = makeStyles({
':hover': {
backgroundColor: tokens.colorBrandBackgroundHover,
color: tokens.colorNeutralForegroundOnBrand,
[`& .${iconFilledClassName}`]: {
color: tokens.colorNeutralForegroundOnBrand,
},
},
':active': {
backgroundColor: tokens.colorBrandBackgroundPressed,
color: tokens.colorNeutralForegroundOnBrand,
[`& .${iconFilledClassName}`]: {
color: tokens.colorNeutralForegroundOnBrand,
},
},
},
medium: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,14 @@ const useDismissIconStyles = makeStyles({
color: tokens.colorCompoundBrandForeground1Pressed,
},
},
selected: {
':hover': {
color: tokens.colorNeutralForegroundOnBrand,
},
':active': {
color: tokens.colorNeutralForegroundOnBrand,
},
},
});

export const usePrimaryTextStyles = makeStyles({
Expand Down Expand Up @@ -354,7 +362,7 @@ export const useTagStyles_unstable = (state: TagState): TagState => {
shape === 'rounded' ? rootRoundedBaseClassName : rootCircularBaseClassName,

state.disabled ? rootDisabledStyles[appearance] : rootStyles[appearance],
selected && rootStyles.selected,
selected && !state.disabled && rootStyles.selected,
rootStyles[size],

!state.media && !state.icon && rootWithoutMediaStyles[size],
Expand Down Expand Up @@ -399,6 +407,7 @@ export const useTagStyles_unstable = (state: TagState): TagState => {
dismissIconStyles.base,
dismissIconStyles[size],
!state.disabled && dismissIconStyles[appearance],
selected && !state.disabled && dismissIconStyles.selected,
state.dismissIcon.className,
);
}
Expand Down

0 comments on commit 1ccba12

Please sign in to comment.