Skip to content

Instantly share code, notes, and snippets.

@samueljmurray
Last active August 30, 2017 15:57
Show Gist options
  • Save samueljmurray/3967df020ebac87eee15f2ebd3f335cb to your computer and use it in GitHub Desktop.
Save samueljmurray/3967df020ebac87eee15f2ebd3f335cb to your computer and use it in GitHub Desktop.
Button styles - with function
/* buttonStyles.js */
export default (props) => StyleSheet.create({
button: StyleSheet.flatten([
{
backgroundColor: "#DDD",
},
props.colour && {
backgroundColor: props.colour,
},
props.disabled && {
backgroundColor: "#999",
},
]),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment