UNPKG

@oni-mobile/react-native-action-menu

Version:
59 lines (54 loc) 1.56 kB
/** * Basic example of react native circular action menu * https://github.com/geremih/react-native-circular-action-menu */ import React, { AppRegistry, Component, StyleSheet, Text, View } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import ActionButton from 'react-native-circular-action-menu'; class Basic extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}> Basic Example </Text> <ActionButton buttonColor="rgba(231,76,60,1)"> <ActionButton.Item buttonColor='#9b59b6' onPress={() => console.log("notes tapped!")}> <Icon name="android-create" style={styles.actionButtonIcon} /> </ActionButton.Item> <ActionButton.Item buttonColor='#3498db' onPress={() => {}}> <Icon name="android-notifications-none" style={styles.actionButtonIcon} /> </ActionButton.Item> <ActionButton.Item buttonColor='#1abc9c' onPress={() => {}}> <Icon name="android-done-all" style={styles.actionButtonIcon} /> </ActionButton.Item> </ActionButton> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF' }, welcome: { fontSize: 20, textAlign: 'center', margin: 10 }, actionButtonIcon: { fontSize: 20, height: 22, color: 'white', } }); AppRegistry.registerComponent('Basic', () => Basic);