Skip to content

Instantly share code, notes, and snippets.

@Chiamaka
Created February 5, 2018 16:27
Show Gist options
  • Save Chiamaka/69ba27a26c61f3e9ade5420508c9ba46 to your computer and use it in GitHub Desktop.
Save Chiamaka/69ba27a26c61f3e9ade5420508c9ba46 to your computer and use it in GitHub Desktop.
import React, { PureComponent } from 'react';
import { View, Text, Animated, TouchableWithoutFeedback } from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import PropTypes from 'prop-types';
export default class AddButton extends PureComponent {
render() {
return (
<TouchableWithoutFeedback>
<Animated.View style={styles.counterIncrementStyle}>
<Icon name="ios-add" size={30} color={'white'} />
</Animated.View>
</TouchableWithoutFeedback>
);
}
}
AddButton.propTypes = {
animationValue: PropTypes.object,
animateCircle: PropTypes.func.isRequired
};
const styles = {
counterIncrementStyle: {
borderRadius: 30,
width: 60,
height: 60,
alignItems: 'center',
justifyContent: 'center',
shadowOpacity: 0.3,
shadowOffset: { x: 0, y: 2 },
shadowColor: 'black',
backgroundColor: 'rgb(49, 186, 201)'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment