aminebenkeroum / toggle-switch-react-native

Toggle Switch React Native Component works on both iOS and Android
MIT License
235 stars 70 forks source link

enable styling override #14

Closed G3z closed 5 years ago

G3z commented 5 years ago

this way the style can be overriden for both tumb or track

<ToggleSwitch
                    style={styles.setting_input}
                    isOn={item.enabled == 1}
                    onColor="white"
                    thumbOnStyle={{ backgroundColor: 'blue' }}
                    thumbOffStyle={{
                        backgroundColor: 'rgba(255,255,255,0.5)',
                        borderColor: 'blue',
                        borderWidth: 1
                    }}
                    offColor="rgba(255,255,255,0.5)"
                    size="large"
                    onToggle={value => dispatch(updateSettings(item.name, value))}
                />
skylartaylor commented 5 years ago

I would love to see this merged, being able to style the toggle itself would be so handy!

aminebenkeroum commented 5 years ago

Thank you guys!