Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Switch ThumbColor with React-Native

$
0
0

I would like to make a switch on my app with react-native. The switch should look like this switch as demonstrated below:enter image description here

I've tried with Linear Gradient with unsuccessful

<Switch                    trackColor={{ false: Colors.GrayTransparent, true: Colors.GrayTransparent }}                    ios_backgroundColor='#3e3e3e'                    onValueChange={toggleSwitch}                    value={isEnabled}                    thumbColor={                        isEnabled ? (<LinearGradient                                start={{ x: 0, y: 0 }}                                end={{ x: 1, y: 1 }}                                colors={['#EED02D', '#9A4A90', '#EB9D27', '#4B77B6', '#C43438', '#C43438']}                            />                        ) : (                            Colors.Blue                        )                    }                />

Thank you a lot :)


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>