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() {
24
24
<nav class =" nav" >
25
25
<div class =" upper" >
26
26
<SidebarButton
27
- v-if =" store.currentPage = == Page.Settings"
27
+ :disabled =" store.currentPage ! == Page.Settings"
28
28
@click =" handleBack"
29
29
>
30
30
<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
+
1
11
<template >
2
- <button class =" sidebar-button" >
12
+ <button
13
+ class =" sidebar-button"
14
+ :disabled =" disabled || undefined"
15
+ :class =" { disabled }"
16
+ >
3
17
<slot />
4
18
</button >
5
19
</template >
12
26
border : 1px solid transparent ;
13
27
@include focus-visible ;
14
28
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 );
17
36
18
- :deep (.icon ) {
19
- color : var (--white );
37
+ :deep (.icon ) {
38
+ color : var (--white );
39
+ }
20
40
}
21
- }
22
41
23
- & :hover {
24
- :deep (.icon ) {
25
- color : var (--white );
42
+ & :hover {
43
+ :deep (.icon ) {
44
+ color : var (--white );
45
+ }
26
46
}
27
47
}
28
48
You can’t perform that action at this time.
0 commit comments