⭐️ Example - Added: ContextMenuViewTest02
This commit is contained in:
parent
8e7654e2bd
commit
0e2228142c
@ -2,13 +2,15 @@ import * as React from 'react';
|
||||
import { StyleSheet, SafeAreaView, ScrollView } from 'react-native';
|
||||
|
||||
import { ContextMenuViewTest01 } from './components/ContextMenuViewTest01';
|
||||
import { ContextMenuViewTest02 } from './components/ContextMenuViewTest02';
|
||||
|
||||
export default function App() {
|
||||
|
||||
return (
|
||||
<SafeAreaView style={styles.rootContainer}>
|
||||
<ScrollView>
|
||||
<ScrollView contentContainerStyle={styles.scrollviewContainer}>
|
||||
<ContextMenuViewTest01/>
|
||||
<ContextMenuViewTest02/>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
);
|
||||
@ -18,4 +20,7 @@ const styles = StyleSheet.create({
|
||||
rootContainer: {
|
||||
flex: 1,
|
||||
},
|
||||
scrollviewContainer: {
|
||||
paddingBottom: 30,
|
||||
},
|
||||
});
|
||||
|
||||
40
example/src/components/ContextMenuViewTest02.js
Normal file
40
example/src/components/ContextMenuViewTest02.js
Normal file
@ -0,0 +1,40 @@
|
||||
import React from 'react';
|
||||
import { StyleSheet } from 'react-native';
|
||||
|
||||
import { ExampleContextMenuItem } from './ExampleContextMenuItem';
|
||||
|
||||
|
||||
export class ContextMenuViewTest02 extends React.PureComponent {
|
||||
render(){
|
||||
return(
|
||||
<ExampleContextMenuItem
|
||||
index={2}
|
||||
title={'Simple Example #2'}
|
||||
desc={'Context menu with 3 actions (text w/ system icon)'}
|
||||
onPressMenuItem={({key}) => alert(key)}
|
||||
menuConfig={{
|
||||
menuTitle: 'ContextMenuViewTest02',
|
||||
menuItems: [{
|
||||
actionKey : 'key-01',
|
||||
actionTitle: 'Action #1',
|
||||
imageType : 'SYSTEM',
|
||||
imageValue : 'folder',
|
||||
}, {
|
||||
actionKey : 'key-02' ,
|
||||
actionTitle: 'Action #2',
|
||||
imageType : 'SYSTEM',
|
||||
imageValue : 'dial.fill',
|
||||
}, {
|
||||
actionKey : 'key-03' ,
|
||||
actionTitle: 'Action #3',
|
||||
imageType : 'SYSTEM' ,
|
||||
imageValue : 'archivebox.fill',
|
||||
}],
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user