File tree Expand file tree Collapse file tree 2 files changed +30
-10
lines changed
Expand file tree Collapse file tree 2 files changed +30
-10
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ function handleBack() {
2424 <nav class =" nav" >
2525 <div class =" upper" >
2626 <SidebarButton
27- v-if =" store.currentPage = == Page.Settings"
27+ :disabled =" store.currentPage ! == Page.Settings"
2828 @click =" handleBack"
2929 >
3030 <Icons .ChevronLeft />
Original file line number Diff line number Diff line change 1+ <script lang="ts" setup>
2+ interface Props {
3+ disabled? : boolean
4+ }
5+
6+ const props = withDefaults (defineProps <Props >(), {
7+ disabled: false ,
8+ })
9+ </script >
10+
111<template >
2- <button class =" sidebar-button" >
12+ <button
13+ class =" sidebar-button"
14+ :disabled =" disabled || undefined"
15+ :class =" { disabled }"
16+ >
317 <slot />
418 </button >
519</template >
1226 border : 1px solid transparent ;
1327 @include focus-visible ;
1428
15- & :active {
16- background-color : var (--item-hover-bg );
29+ & .disabled {
30+ opacity : .3 ;
31+ }
32+
33+ & :not (.disabled ) {
34+ & :active {
35+ background-color : var (--item-hover-bg );
1736
18- :deep (.icon ) {
19- color : var (--white );
37+ :deep (.icon ) {
38+ color : var (--white );
39+ }
2040 }
21- }
2241
23- & :hover {
24- :deep (.icon ) {
25- color : var (--white );
42+ & :hover {
43+ :deep (.icon ) {
44+ color : var (--white );
45+ }
2646 }
2747 }
2848
You can’t perform that action at this time.
0 commit comments