Created
June 6, 2019 15:53
-
-
Save lukebrandonfarrell/50af6ccec474b0a671b10d2b5a999899 to your computer and use it in GitHub Desktop.
<Alert /> component styled at specialized level.
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 React from "react"; | |
import { View, Text } from "react-native"; | |
const Alert = ({ title, text }) => { | |
return ( | |
<ThemeContext.Consumer> | |
{theme => ( | |
<View style={[ | |
..., | |
{ | |
backgroundColor: "#fdd5d3", | |
borderColor: "#fc9e97" | |
} | |
]}> | |
<Text style={[..., { color: "#a4150b" }]}> {title} </Text> | |
<Text style={[..., { color: "#a4150b" }]}> {text} </Text> | |
</View> | |
</ThemeContext.Consumer> | |
); | |
}; | |
export default Alert; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment