Skip to content

Instantly share code, notes, and snippets.

@eikonomega
Created May 22, 2020 22:08
Show Gist options
  • Save eikonomega/0c30eb811ab9a612b9cf611963bc187c to your computer and use it in GitHub Desktop.
Save eikonomega/0c30eb811ab9a612b9cf611963bc187c to your computer and use it in GitHub Desktop.
Button100x30 w/single `props` argument
// ... all the stuff from above.
/**
* A simple, stylized, 100x30 button that you
* can be disabled and further styled.
*/
export default function Button100x30(props) {
return (
<TouchableOpacity
style={[styles.button, props.containerStyle]}
onPress={props.onPress}
disabled={props.disabled}
>
<Text style={styles.text}>{props.text}</Text>
</TouchableOpacity>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment