Skip to content

Instantly share code, notes, and snippets.

@anatooly
Created September 25, 2023 10:48
Show Gist options
  • Save anatooly/3a8e2e21418d8de2d499d8f190de8eb2 to your computer and use it in GitHub Desktop.
Save anatooly/3a8e2e21418d8de2d499d8f190de8eb2 to your computer and use it in GitHub Desktop.
RN little switch
<Switch
style={{ transform: [{ scaleX: 0.9 }, { scaleY: 0.9 }] }}
onValueChange={handleValueChange}
value={value}
ios_backgroundColor={value ? '#B3BCB4' : '#B6B6B6'}
trackColor={{
false: '#B6B6B6',
true: '#B3BCB4',
}}
thumbColor={value ? palette.green : palette.gray}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment