Created
July 24, 2018 19:49
-
-
Save syamjayaraj/8d53900d1b46d4a32e99ceee606ced9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class FAB extends Component { | |
... | |
... | |
| |
render() { | |
const { data } = this.state; | |
return ( | |
<View style={styles.container}> | |
... | |
... | |
<TouchableOpacity onPress={() => alert('FAB clicked')} style={styles.fab}> | |
<Text style={styles.fabIcon}>+</Text> | |
</TouchableOpacity> | |
</View> | |
) | |
} | |
} | |
const styles = StyleSheet.create({ | |
... | |
... | |
fab: { | |
position: 'absolute', | |
width: 56, | |
height: 56, | |
alignItems: 'center', | |
justifyContent: 'center', | |
right: 20, | |
bottom: 20, | |
backgroundColor: '#03A9F4', | |
borderRadius: 30, | |
elevation: 8 | |
}, | |
fabIcon: { | |
fontSize: 40, | |
color: 'white' | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment