Last active
March 2, 2018 19:10
-
-
Save peterpme/ed1ff4b16bb67005c392c8bd71689643 to your computer and use it in GitHub Desktop.
ReactJS Component Label for Medium
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, StyleSheet } from 'react-native' | |
const Label = ({ label }) => ( | |
<View style={styles.container}> | |
<Text style={styles.label}>{label}</Text> | |
</View> | |
) | |
const styles = StyleSheet.create({ | |
container: { | |
borderRadius: 4, | |
paddingHorizontal: 10, | |
paddingVertical: 2, | |
backgroundColor: "#EEE" | |
}, | |
label: { | |
color: "white", | |
textAlign: "center", | |
fontSize: 11 | |
} | |
}) | |
export default Label |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment