Skip to content

Instantly share code, notes, and snippets.

@peterpme
Last active March 2, 2018 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterpme/ed1ff4b16bb67005c392c8bd71689643 to your computer and use it in GitHub Desktop.
Save peterpme/ed1ff4b16bb67005c392c8bd71689643 to your computer and use it in GitHub Desktop.
ReactJS Component Label for Medium
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