Skip to content

Commit

Permalink
fix(UserSelect): fixed disable state of item (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
gizeasy committed Jul 21, 2021
1 parent 0dabcd1 commit 35d25f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/components/UserSelect/UserSelectItem/UserSelectItem.css
Expand Up @@ -35,7 +35,7 @@
}

&_disable {
color: var(--color-control-typo-disabled);
color: var(--color-control-typo-disable);
}

&_hovered {
Expand Down Expand Up @@ -116,5 +116,9 @@
&-SubLabel {
opacity: 0.7;
font-size: var(--sub-label-font-size);

&_disable {
opacity: 1;
}
}
}
6 changes: 3 additions & 3 deletions src/components/UserSelect/UserSelectItem/UserSelectItem.tsx
Expand Up @@ -46,12 +46,12 @@ export const UserSelectItem: React.FC<UserSelectItemProps> = (props) => {
return (
<div
{...otherProps}
className={cnUserSelectItem({ active, hovered, size, indent }, [className])}
className={cnUserSelectItem({ active, hovered, size, indent, disable }, [className])}
aria-selected={active}
role="option"
>
<div className={cnUserSelectItem('AvatarContainer')}>
<Avatar className={cnUserSelectItem('Avatar', { disable })} url={avatarUrl} name={label} />
<Avatar className={cnUserSelectItem('Avatar')} url={avatarUrl} name={label} />
{multiple && (
<CSSTransition
in={active}
Expand All @@ -69,7 +69,7 @@ export const UserSelectItem: React.FC<UserSelectItemProps> = (props) => {
) : (
<div className={cnUserSelectItem('Info')}>
<div>{label}</div>
<div className={cnUserSelectItem('SubLabel')}>{subLabel}</div>
<div className={cnUserSelectItem('SubLabel', { disable })}>{subLabel}</div>
</div>
)}
</div>
Expand Down

0 comments on commit 35d25f9

Please sign in to comment.