INNER CODE UNIT · JavaScript
GaButton
creativetimofficial/material-kit-react-native · components/Button.js:8
export default class GaButton extends React.Component {
render() {
const { gradient, children, style, ...props } = this.props;
if (gradient) {
return (
<LinearGradient
start={{ x: 0, y: 0 }}
end={{ x: 1, y: 0 }}
locations={[0.2, 1]}
style={[styles.gradient, style]}
colors={[materialTheme.COLORS.GRADIENT_START, materialTheme.COLORS.GRADIENT_END]}
>
<Button color="transparent" style={[styles.gradient, style]} {...props}>
<Text color={theme.COLORS.WHITE}>{children}</Text>
</Button>
</LinearGradient>
);