Skip to content

Instantly share code, notes, and snippets.

@jacobp100
Last active February 28, 2017 16:22
Show Gist options
  • Save jacobp100/afccce073b4fdaf37c5fdb6c9443eba7 to your computer and use it in GitHub Desktop.
Save jacobp100/afccce073b4fdaf37c5fdb6c9443eba7 to your computer and use it in GitHub Desktop.
import { View, Text } from 'react-native';
import cssta from 'cssta/native';
const ButtonContainer = cssta(View)`
margin: 10px 50px;
padding: 10px 15px;
border-radius: 1000px;
border: 1px solid #e67e22;
background-color: white;
[active] {
background-color: #e67e22;
}
`;
const ButtonText = cssta(Text)`
color: #e67e22;
text-align: center;
[active] {
color: white;
}
`;
const Button = ({ children }) => (
<TouchableCustom>
{active => (
<ButtonContainer active={active}>
<ButtonText active={active}>
{children}
</ButtonText>
</ButtonContainer>
)}
</TouchableCustom>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment