Commit b0d84b8 1 parent c21dd8f commit b0d84b8 Copy full SHA for b0d84b8
File tree 2 files changed +7
-7
lines changed
lib/src/client/color-switch
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 6
6
border-radius : 50% ;
7
7
border : 1px dashed gray ;
8
8
cursor : pointer ;
9
- --size : 25px ;
10
- height : var (--size );
11
- width : var (--size );
9
+ --s : 25px ;
10
+ height : var (--s );
11
+ width : var (--s );
12
12
transition : all 0.3s ease-in-out 0s !important ;
13
13
}
14
14
21
21
top : 0 ;
22
22
left : 0 ;
23
23
font-weight : 600 ;
24
- font-size : calc (1 * var (--size ) / 2 );
24
+ font-size : calc (1 * var (--s ) / 2 );
25
25
display : flex ;
26
26
align-items : center ;
27
27
justify-content : center ;
31
31
[data-csp = " dark" ] .s ,
32
32
[data-csp = " dark" ] ~ .s ,
33
33
[data-csp = " dark" ] ~ * .s {
34
- box-shadow : calc (var (--size ) / 4 ) calc (var (--size ) / -4 ) calc (var (--size ) / 8 ) inset #fff ;
34
+ box-shadow : calc (var (--s ) / 4 ) calc (var (--s ) / -4 ) calc (var (--s ) / 8 ) inset #fff ;
35
35
border : none ;
36
36
background : transparent ;
37
37
animation : a linear 0.5s ;
Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ export const ColorSwitch = ({
33
33
} : ColorSwitchProps ) => {
34
34
const { toggleColorScheme } = useTheme ( targetSelector ) ;
35
35
36
- const cls = [ styles [ "color-switch" ] , className ] . join ( " " ) ;
36
+ const cls = [ styles . s , className ] . join ( " " ) ;
37
37
return (
38
38
< button
39
39
className = { cls }
40
40
data-testid = "color-switch"
41
41
// skipcq: JS-0417
42
42
onClick = { ( ) => toggleColorScheme ( skipSystem ) }
43
43
// @ts -expect-error -- setting custom attribute
44
- style = { { "--size " : `${ size } px` } }
44
+ style = { { "--s " : `${ size } px` } }
45
45
{ ...props }
46
46
/>
47
47
) ;
You can’t perform that action at this time.
0 commit comments