Skip to content

Instantly share code, notes, and snippets.

View abhiaiyer91's full-sized avatar

Abhi Aiyer abhiaiyer91

  • Netlify
  • Los Angeles
View GitHub Profile
@abhiaiyer91
abhiaiyer91 / rn-button.js
Created April 4, 2017 19:38 — forked from GollyJer/rn-button.js
React Native Button
import React from 'react';
import { Text, TouchableNativeFeedback, TouchableOpacity, View, Platform } from 'react-native';
import styles from './styles.js';
const Button = ({ color, onPress, title, disabled }) => {
let Touchable;
const buttonStyle = [styles.button];
const textStyle = [styles.text];
switch (Platform.OS) {
@abhiaiyer91
abhiaiyer91 / rn-button.jsx
Last active April 4, 2017 19:40 — forked from GollyJer/rn-button.js
React Native Button
import React from 'react';
import { withProps } from 'recompose';
import { Text, TouchableNativeFeedback, TouchableOpacity, View, Platform } from 'react-native';
import styles from './styles.js';
function Button({ Component, buttonStyle, textStyle, onPress, title, disabled }) {
return (
<Component disabled={disabled} onPress={onPress}>
<View style={buttonStyle}>
<Text style={textStyle}>{title}</Text>