Created
May 30, 2020 21:19
-
-
Save jacobp100/1a6a49dca4176ae90becd33f6a402ee6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
PlatformColor, | |
DynamicColorIOS as BaseDynamicColorIOS, | |
Platform | |
} from 'react-native' | |
// Stops this crashing when called on other platforms | |
const DynamicColorIOS = Platform.select({ | |
ios: BaseDynamicColorIOS, | |
default: () => null | |
}) | |
export const backgroundColor = Platform.select({ | |
ios: DynamicColorIOS({light: 'white', dark: 'black'}), | |
android: PlatformColor('@color/background') | |
}) | |
export const textColor = ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment