Skip to content

Commit dfba6b6

Browse files
committed
fix(style): disabled button
1 parent 45b86a7 commit dfba6b6

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

app/components/Button/Base.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ defineExpose({
2121
<template>
2222
<button
2323
ref="el"
24-
class="inline-flex gap-x-1 items-center justify-center px-4 py-2 font-mono text-sm border border-border rounded-md transition-all duration-200 focus-ring active:scale-98 disabled:(opacity-40 cursor-not-allowed hover:bg-transparent hover:text-fg)"
24+
class="inline-flex gap-x-1 items-center justify-center px-4 py-2 font-mono text-sm border border-border rounded-md transition-all duration-200 focus-ring active:scale-98 disabled:(opacity-40 cursor-not-allowed)"
2525
:class="[
2626
variant === 'primary'
27-
? 'text-bg bg-fg hover:bg-fg/90'
28-
: 'bg-transparent text-fg hover:(bg-fg hover:text-bg border-fg)',
29-
{
30-
'opacity-50 cursor-not-allowed': disabled,
31-
},
27+
? 'text-bg bg-fg hover:enabled:(bg-fg/90)'
28+
: 'bg-transparent text-fg hover:enabled:(bg-fg text-bg border-fg)',
3229
]"
3330
:type="props.type"
3431
:disabled="disabled ? true : undefined"

app/components/Tag/Button.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ const props = defineProps<{
1313

1414
<template>
1515
<button
16-
class="inline-flex items-center px-2 py-0.5 text-xs font-mono border rounded transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
16+
class="inline-flex items-center px-2 py-0.5 text-xs font-mono border rounded transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1 disabled:(opacity-50 cursor-not-allowed)"
1717
:class="[
1818
pressed
19-
? 'bg-fg text-bg border-fg hover:(text-text-bg/50)'
20-
: 'bg-bg-muted text-fg-muted border-border hover:(text-fg border-border-hover)',
21-
{
22-
'opacity-50 cursor-not-allowed': disabled,
23-
},
19+
? 'bg-fg text-bg border-fg hover:enabled:(text-text-bg/50)'
20+
: 'bg-bg-muted text-fg-muted border-border hover:enabled:(text-fg border-border-hover)',
2421
]"
2522
type="button"
2623
:disabled="disabled ? true : undefined"

0 commit comments

Comments
 (0)