| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @flow |
| 8 | */ |
| 9 | |
| 10 | import * as React from 'react'; |
| 11 | import { |
| 12 | Menu, |
| 13 | MenuList as ReachMenuList, |
| 14 | MenuButton, |
| 15 | MenuItem, |
| 16 | } from '@reach/menu-button'; |
| 17 | import useThemeStyles from '../../useThemeStyles'; |
| 18 | |
| 19 | const MenuList = ({ |
| 20 | children, |
| 21 | ...props |
| 22 | }: { |
| 23 | children: React$Node, |
| 24 | ... |
| 25 | }): React.Node => { |
| 26 | const style = useThemeStyles(); |
| 27 | return ( |
| 28 | // $FlowFixMe[cannot-spread-inexact] unsafe spread |
| 29 | <ReachMenuList style={style} {...props}> |
| 30 | {children} |
| 31 | </ReachMenuList> |
| 32 | ); |
| 33 | }; |
| 34 | |
| 35 | export {MenuItem, MenuButton, MenuList, Menu}; |