Platform API figures what operating system you are on.
backgroundColor: Platform.OS === "android" ? Colors.primary : "white"
backgroundColor: Platform.OS === "ios" ? Colors.primary : "white"
Alternate is to use Platform.select
<View
style={{
...styles.headerBase
...Platform.select({
ios: styles.headerIOS,
android: styles.headerAndroid
})
}}>
</View>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter