import React from "react"; import { Flex, Box, Text } from "rebass"; function Menu(props) { return ( {props.menuItems.map(item => ( { e.stopPropagation(); if (props.dropdownRef) { props.dropdownRef.hide(); } if (item.onClick) { item.onClick(props.data); } }} flexDirection="row" alignItems="center" py={1} px={2} sx={{ color: item.color || "fontPrimary", ":hover": { backgroundColor: "primary", color: "fontSecondary" } }} > {item.title} ))} ); } export default Menu;