Skip to content

Instantly share code, notes, and snippets.

Avatar

Abhi Aiyer abhiaiyer91

  • Workpop
  • Los Angeles
View GitHub Profile
@abhiaiyer91
abhiaiyer91 / rn-button.jsx
Last active Apr 4, 2017 — forked from GollyJer/rn-button.js
React Native Button
View rn-button.jsx
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>
@abhiaiyer91
abhiaiyer91 / rn-button.js
Created Apr 4, 2017 — forked from GollyJer/rn-button.js
React Native Button
View rn-button.js
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) {