File tree Expand file tree Collapse file tree 1 file changed +7
-37
lines changed Expand file tree Collapse file tree 1 file changed +7
-37
lines changed Original file line number Diff line number Diff line change @@ -3,56 +3,26 @@ const visible = defineModel<boolean>()
3
3
</script >
4
4
5
5
<template >
6
- <div class =" wrapper" @click =" visible = !visible" >
7
- <span >Show Error</span >
8
- <div class =" toggle" :class =" [{ active: modelValue }]" >
9
- <div class =" indicator" />
10
- </div >
6
+ <div class =" wrapper" @click.self =" visible = !visible" >
7
+ <v-switch v-model =" visible" label =" Show errors" color =" primary" inset hide-details density =" compact" ></v-switch >
11
8
</div >
12
9
</template >
13
10
14
11
<style scoped>
15
12
.wrapper {
16
13
position : absolute ;
17
14
bottom : 8px ;
18
- right : 15 px ;
15
+ right : 24 px ;
19
16
z-index : 11 ;
20
17
display : flex ;
21
18
align-items : center ;
22
19
background-color : var (--bg );
23
20
color : var (--text-light );
24
21
cursor : pointer ;
25
- padding : 4px 8 px ;
26
- border-radius : 2 px ;
22
+ padding : 4px 12 px ;
23
+ border-radius : 16 px ;
27
24
user-select : none ;
28
- }
29
- .toggle {
30
- display : inline-block ;
31
- margin-left : 4px ;
32
- width : 32px ;
33
- height : 18px ;
34
- border-radius : 12px ;
35
- position : relative ;
36
- background-color : var (--border );
37
- }
38
-
39
- .indicator {
40
- font-size : 12px ;
41
- background-color : var (--text-light );
42
- width : 14px ;
43
- height : 14px ;
44
- border-radius : 50% ;
45
- transition : transform ease-in-out 0.2s ;
46
- position : absolute ;
47
- left : 2px ;
48
- top : 2px ;
49
- color : var (--bg );
50
- text-align : center ;
51
- }
52
-
53
- .active .indicator {
54
- background-color : var (--color-branding );
55
- transform : translateX (14px );
56
- color : white ;
25
+ transform : scale (0.85 );
26
+ transform-origin : right ;
57
27
}
58
28
</style >
You can’t perform that action at this time.
0 commit comments