File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -26,26 +26,36 @@ export const SliderTrack = {
26
26
} ;
27
27
28
28
export const SliderThumb = {
29
- baseStyle : ( ) => {
29
+ baseStyle : ( props : any ) => {
30
+ let { colorScheme } = props ;
30
31
return {
31
32
borderRadius : 'full' ,
32
33
zIndex : 999 ,
33
34
alignItems : 'center' ,
34
35
justifyContent : 'center' ,
35
36
scaleOnPressed : 1.2 ,
36
37
_light : {
37
- bg : 'primary .600' ,
38
+ bg : ` ${ colorScheme } .600` ,
38
39
} ,
39
40
_dark : {
40
- bg : 'primary .500' ,
41
+ bg : ` ${ colorScheme } .500` ,
41
42
} ,
42
43
shadow : 6 ,
43
44
} ;
44
45
} ,
46
+ defaultProps : {
47
+ colorScheme : 'primary' ,
48
+ } ,
45
49
} ;
46
50
47
51
export const SliderFilledTrack = {
48
- baseStyle : ( { orientation, isReversed, sliderTrackPosition, size } : any ) => {
52
+ baseStyle : ( {
53
+ orientation,
54
+ isReversed,
55
+ sliderTrackPosition,
56
+ size,
57
+ colorScheme,
58
+ } : any ) => {
49
59
return {
50
60
left : orientation !== 'vertical' && ! isReversed ? 0 : undefined ,
51
61
bottom : orientation === 'vertical' && ! isReversed ? 0 : undefined ,
@@ -56,13 +66,16 @@ export const SliderFilledTrack = {
56
66
? { height : sliderTrackPosition , width : size }
57
67
: { width : sliderTrackPosition , height : size } ,
58
68
_light : {
59
- bg : 'primary .600' ,
69
+ bg : ` ${ colorScheme } .600` ,
60
70
} ,
61
71
_dark : {
62
- bg : 'primary .500' ,
72
+ bg : ` ${ colorScheme } .500` ,
63
73
} ,
64
74
} ;
65
75
} ,
76
+ defaultProps : {
77
+ colorScheme : 'primary' ,
78
+ } ,
66
79
} ;
67
80
68
81
const sizes = {
You can’t perform that action at this time.
0 commit comments