File size: 1,032 Bytes
7bbd534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { mode } from '@chakra-ui/theme-tools';
export const switchStyles = {
    components: {
        Switch: {
            baseStyle: {
                thumb: {
                    fontWeight: 400,
                    borderRadius: '50%',
                    w: '16px',
                    h: '16px',
                    _checked: { transform: 'translate(20px, 0px)' },
                },
                track: {
                    display: 'flex',
                    alignItems: 'center',
                    boxSizing: 'border-box',
                    w: '40px',
                    h: '20px',
                    p: '2px',
                    ps: '2px',
                    _focus: {
                        boxShadow: 'none',
                    },
                },
            },

            variants: {
                main: (props: any) => ({
                    track: {
                        bg: mode('gray.300', 'navy.700')(props),
                    },
                }),
            },
        },
    },
};