| 1234567891011121314151617181920212223242526272829303132 |
- import React from "react";
- import PropTypes from "prop-types";
- import { Popover } from "@mui/material";
-
- const PopoverComponent = ({ open, anchorEl, onClose, content }) => {
- const handleClose = () => {
- onClose();
- };
-
- return (
- <Popover
- open={open}
- anchorEl={anchorEl}
- onClose={handleClose}
- anchorOrigin={{
- vertical: "bottom",
- horizontal: "left",
- }}
- >
- {content}
- </Popover>
- );
- };
-
- PopoverComponent.propTypes = {
- anchorEl: PropTypes.object,
- open: PropTypes.bool.isRequired,
- onClose: PropTypes.func.isRequired,
- content: PropTypes.any,
- };
-
- export default PopoverComponent;
|