🛠 Refactor: Example - Rename ContextMenuViewExample22
Summary: Rename `ContextMenuViewExample22` to `ContextMenuViewExample23`
This commit is contained in:
parent
c2aa990fcf
commit
83aecaf679
@ -1,69 +0,0 @@
|
||||
/* eslint-disable react-native/no-inline-styles */
|
||||
import * as React from 'react';
|
||||
import { Alert, View, Text, StyleSheet } from 'react-native';
|
||||
|
||||
import { ContextMenuView } from 'react-native-ios-context-menu';
|
||||
|
||||
import type { ContextMenuExampleProps } from './SharedExampleTypes';
|
||||
import { ContextMenuCard } from '../components/ContextMenuCard';
|
||||
|
||||
import * as COLORS from '../constants/Colors';
|
||||
|
||||
|
||||
export function ContextMenuViewExample22(props: ContextMenuExampleProps) {
|
||||
return (
|
||||
<ContextMenuView
|
||||
style={props.style}
|
||||
menuConfig={{
|
||||
menuTitle: 'ContextMenuViewExample22',
|
||||
menuItems: [{
|
||||
actionKey : 'key-01',
|
||||
actionTitle: 'Everything you own',
|
||||
actionSubtitle: 'in the box to the left'
|
||||
}],
|
||||
}}
|
||||
auxiliaryPreviewConfig={{
|
||||
alignmentHorizontal: 'previewCenter',
|
||||
}}
|
||||
renderAuxillaryPreview={() => (
|
||||
<View style={[styles.auxRootContainer, {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}]}>
|
||||
<Text style={styles.textLabel}>
|
||||
Center
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
onPressMenuItem={({nativeEvent}) => {
|
||||
Alert.alert(
|
||||
'onPressMenuItem Event',
|
||||
`actionKey: ${nativeEvent.actionKey} - actionTitle: ${nativeEvent.actionTitle}`
|
||||
);
|
||||
}}
|
||||
>
|
||||
<ContextMenuCard
|
||||
index={props.index}
|
||||
title={'ContextMenuViewExample22'}
|
||||
subtitle={'EXPERIMENTAL - Aux. Preview'}
|
||||
description={[
|
||||
`Basic 'ContextMenuView' w/ a auxillary preview xxx`,
|
||||
`alignmentHorizontal: 'previewCenter'`
|
||||
]}
|
||||
/>
|
||||
</ContextMenuView>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
auxRootContainer: {
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 10,
|
||||
padding: 10,
|
||||
width: 200,
|
||||
},
|
||||
textLabel: {
|
||||
fontWeight: '500',
|
||||
color: COLORS.BLUE.A700,
|
||||
},
|
||||
});
|
||||
@ -25,7 +25,7 @@ import { ContextMenuViewExample18 } from '../examples/ContextMenuViewExample18';
|
||||
import { ContextMenuViewExample19 } from '../examples/ContextMenuViewExample19';
|
||||
import { ContextMenuViewExample20 } from '../examples/ContextMenuViewExample20';
|
||||
import { ContextMenuViewExample21 } from '../examples/ContextMenuViewExample21';
|
||||
import { ContextMenuViewExample22 } from '../examples/ContextMenuViewExample22';
|
||||
import { ContextMenuViewExample23 } from '../examples/ContextMenuViewExample23';
|
||||
|
||||
import { ContextMenuViewTest01 } from '../examples/ContextMenuViewTest01';
|
||||
import { ContextMenuViewTest02 } from '../examples/ContextMenuViewTest02';
|
||||
@ -71,7 +71,7 @@ const EXAMPLE_COMPONENTS = [
|
||||
ContextMenuViewExample19,
|
||||
ContextMenuViewExample20,
|
||||
ContextMenuViewExample21,
|
||||
ContextMenuViewExample22,
|
||||
ContextMenuViewExample23,
|
||||
ContextMenuViewTest01,
|
||||
ContextMenuViewTest02,
|
||||
ContextMenuViewTest03,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user