diff --git a/example/src/Examples/MenuExample.tsx b/example/src/Examples/MenuExample.tsx index 6559f3d8f0..f676bf31e3 100644 --- a/example/src/Examples/MenuExample.tsx +++ b/example/src/Examples/MenuExample.tsx @@ -31,6 +31,23 @@ type MenuVisibility = { const MORE_ICON = Platform.OS === 'ios' ? 'dots-horizontal' : 'dots-vertical'; +const longMenuItems = [ + 'Home', + 'About us', + 'History', + 'Team', + 'Products', + 'Investments', + 'R&D', + 'News', + 'Archive', + 'Events', + 'Blog', + 'Account', + 'Press', + 'Contact', +]; + const MenuExample = ({ navigation }: Props) => { const [visible, setVisible] = React.useState({}); const [contextualMenuCoord, setContextualMenuCoor] = @@ -146,6 +163,49 @@ const MenuExample = ({ navigation }: Props) => { + + + + Left + + } + > + {longMenuItems.map((item) => ( + {}} /> + ))} + + + Center + + } + > + {longMenuItems.map((item) => ( + {}} /> + ))} + + + Right + + } + > + {longMenuItems.map((item) => ( + {}} /> + ))} + + + { const styles = StyleSheet.create({ wrapper: { position: 'absolute', + overflow: 'hidden', }, shadowMenuContainer: { opacity: 0, diff --git a/src/components/__tests__/__snapshots__/Menu.test.tsx.snap b/src/components/__tests__/__snapshots__/Menu.test.tsx.snap index c829729253..4f1def2af1 100644 --- a/src/components/__tests__/__snapshots__/Menu.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/Menu.test.tsx.snap @@ -228,6 +228,7 @@ exports[`renders menu with content styles 1`] = ` style={ [ { + "overflow": "hidden", "position": "absolute", }, { @@ -946,6 +947,7 @@ exports[`renders visible menu 1`] = ` style={ [ { + "overflow": "hidden", "position": "absolute", }, {