import React, {useState} from 'react';
import {
NativeModules,
StyleSheet,
View,
StatusBar,
Text,
TouchableOpacity,
ActionSheetIOS,
Platform,
Button,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
const App = () => {
const {CallNative} = NativeModules;
if (Platform.OS === 'ios') {
CallNative.connect();
}
Icon.loadFont();
const IconButton = ({onPress, iconName, iconSize, iconColor}: any) => {
return (
);
};
const [isActionSheetVisible, setActionSheetVisible] = useState(false);
const handlePress = () => {
showActionMenu();
};
const showActionMenu = () => {
if (Platform.OS === 'ios') {
const options = [
'Features'
];
ActionSheetIOS.showActionSheetWithOptions(
{
options: options,
cancelButtonIndex: options.length - 1,
// destructiveButtonIndex: 2, // Index of the destructive option (optional)
tintColor: 'blue', // Color of the option text (optional)
},
buttonIndex => {
// Handle the selected option
//FEATURES1
else {
// Cancel button or tapping outside the action menu
}
},
);
} else {
// Android implementation
setActionSheetVisible(true);
}
};
const handleActionSheetPress = async (buttonIndex: any) => {
setActionSheetVisible(false);
//FEATURES2
};
return (
NexilisSampleCode
{isActionSheetVisible && (
//FEATURES3
)}
);
};
const styles = StyleSheet.create({
loginButtonSection: {
width: '100%',
height: '100%',
justifyContent: 'center',
alignItems: 'center',
},
container: {
flex: 1,
},
viewAppBar: {
width: '100%',
height: '10%',
backgroundColor: '#3669ad',
justifyContent: 'center',
position: 'relative',
},
textTitle: {
position: 'absolute',
left: '30%',
color: 'white',
fontSize: 18,
top: '50%',
},
iconButton: {
position: 'absolute',
right: '5%',
top: -8,
color: 'white',
},
});
export default App;