Skip to content

Instantly share code, notes, and snippets.

@LucasSouzaa
Forked from ohenrique/midway-component.js
Last active January 13, 2020 04:13
Show Gist options
  • Select an option

  • Save LucasSouzaa/c6df07c7699348a8e438c0dc7498ecfb to your computer and use it in GitHub Desktop.

Select an option

Save LucasSouzaa/c6df07c7699348a8e438c0dc7498ecfb to your computer and use it in GitHub Desktop.
import React from "react";
import { TouchableOpacity } from "react-native";
import styles from "./styles";
import MidwayText from "./midway-text";
import { primary } from "./types/button-types";
const MidwayButton = props => {
const { type, style, children } = props;
const { textStyle, ...buttonStyle } = type || primary;
return (
<TouchableOpacity style={[styles.button, buttonStyle, style]}>
<MidwayText style={textStyle}>{children}</MidwayText>
</TouchableOpacity>
);
};
export default MidwayButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment