react-native-toggle-element
react-native-toggle-element copied to clipboard
How do i padding for trackbar
Thank you for your lib @mymai91
I would like to make toggle like this:

I tried with padding: 3px in trackBarStyle and trackBar, but it's not working. Please tell me how to do it. Here is my code:
<Toggle
value={value}
onPress={onChange}
trackBar={{
width: 40,
}}
trackBarStyle={{ height: 24, width: 40, backgroundColor: Colors.PrimaryBlueBlizzardBlue }}
thumbButton={{ height: 18, width: 18, radius: 9 }}
thumbStyle={{ backgroundColor: Colors.white }}
/>
Thank you so much <3
@hungdev Hey, not sure if you still have this issue but I ran into wanting to do this as well. I ended up just adding a wrapper container around the toggle and adding the padding on it and matching the background color of the wrapper and the trackBar.
May not work in your case but was the easiest solution for me.