MCPcopy
hub / github.com/callstack/react-native-paper / makeMenu

Function makeMenu

src/components/__tests__/Menu.test.tsx:106–124  ·  view source on GitHub ↗
(visible: boolean)

Source from the content-addressed store, hash-verified

104 .mockImplementation((fn) => fn(100, 100, 80, 32));
105
106 function makeMenu(visible: boolean) {
107 return (
108 <Portal.Host>
109 <Menu
110 visible={visible}
111 onDismiss={jest.fn()}
112 anchor={
113 <Button mode="outlined" testID="anchor">
114 Open menu
115 </Button>
116 }
117 contentStyle={styles.contentStyle}
118 >
119 <Menu.Item onPress={jest.fn()} title="Undo" />
120 <Menu.Item onPress={jest.fn()} title="Redo" />
121 </Menu>
122 </Portal.Host>
123 );
124 }
125
126 render(makeMenu(false));
127

Callers 1

Menu.test.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…