Skip to content

Commit

Permalink
fix(menu): component name to match documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-fournier committed Sep 13, 2024
1 parent 05dfdf6 commit 7e676f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const DEFAULT_MODE = 'elevated';
* `Modal` contents within a `PaperProvider` in order for the menu to show. This
* wrapping is not necessary if you use Paper's `Modal` instead.
*/
class MenuComponent extends React.Component<Props, State> {
class Menu extends React.Component<Props, State> {
// @component ./MenuItem.tsx
static Item = MenuItem;

Expand Down Expand Up @@ -709,13 +709,13 @@ const styles = StyleSheet.create({
},
});

const MenuWithHOC = withInternalTheme(withSafeAreaInsets(MenuComponent));
const MenuWithHOC = withInternalTheme(withSafeAreaInsets(Menu));

const Menu = MenuWithHOC as typeof MenuWithHOC & {
const MenuWithItem = MenuWithHOC as typeof MenuWithHOC & {
Item: typeof MenuItem;
};

// we need to attach again MenuItem as it is lost after using withSafeAreaInsets
Menu.Item = MenuItem;
MenuWithItem.Item = MenuItem;

export default Menu;
export default MenuWithItem;

0 comments on commit 7e676f3

Please sign in to comment.