Skip to content

Commit 1b766f9

Browse files
authored
fix(button, switcher): remove hover styles for pressed/checked state (#259)
1 parent 7e35a17 commit 1b766f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/Button.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ export default defineComponent({
145145
'bg-zurich text-mediumblue': variant !== 'primary' && pressed,
146146
'text-inherit bg-transparent': variant === 'subtle' && !pressed,
147147
'bg-athens text-navy': variant === 'standard' && !pressed,
148-
'hover:bg-blueribbon active:bg-darkblue': variant === 'primary' && !isDisabled,
148+
'hover:bg-blueribbon active:bg-darkblue': variant === 'primary' && !isDisabled && !pressed,
149149
'hover:bg-gray hover:text-navy active:bg-zurich active:text-mediumblue':
150-
variant !== 'primary' && !isDisabled
150+
variant !== 'primary' && !isDisabled && !pressed
151151
}"
152152
:disabled="isDisabled"
153153
:aria-label="ariaLabel"

src/components/Switcher.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default defineComponent({
7575
:class="{
7676
'text-mediumblue bg-zurich': checked,
7777
'hover:bg-gray hover:text-navy active:bg-zurich48 active:text-mediumblue':
78-
!option.disabled && !disabled,
78+
!option.disabled && !disabled && !checked,
7979
'opacity-40 cursor-not-allowed': option.disabled || disabled
8080
}"
8181
:aria-label="option.icon ? option.label : undefined"

0 commit comments

Comments
 (0)