{"_id":"@7span/phoenix-react-ui-actionitems","name":"@7span/phoenix-react-ui-actionitems","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@7span/phoenix-react-ui-actionitems","version":"1.0.0","description":"A customizable ActionItems component for React applications, built with MUI.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/akshay-7span/react-component-library.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["Action Menu","Action Item","mui","react","phoenix","phoenix-react","phoenix-react-ui","7span"],"author":{"name":"7span"},"license":"MIT","dependencies":{"react":"^18.3.1","react-router":"^6.23.1","react-dom":"^18.3.1","yaml":"^1.10.2","@emotion/react":"^11.11.4","@emotion/styled":"^11.11.5","@mui/icons-material":"^5.15.20","@mui/material":"^5.15.20","react-router-dom":"^6.23.1"},"bugs":{"url":"https://github.com/akshay-7span/react-component-library/issues"},"homepage":"https://github.com/akshay-7span/react-component-library#readme","devDependencies":{},"gitHead":"262d2dd41c64a6fa51a9508afad4a918bdb4f5a1","_id":"@7span/phoenix-react-ui-actionitems@1.0.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-tyZfw+zlEqqp+s0Em0+LNuL4GdkJzrLet0AIgrvOZ3OhRM50IdqEfGFq6pMZDNLz+8DfXK6AXD/JFQab77CWFg==","shasum":"dc36db42ed541d2c247eebc67381f5ebea30a217","tarball":"https://registry.npmjs.org/@7span/phoenix-react-ui-actionitems/-/phoenix-react-ui-actionitems-1.0.0.tgz","fileCount":5,"unpackedSize":22691,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGplcbzCP3ZnFqwTyAZenBNnL8Fthwb6EdLrAMo6sO2wAiBMW/zbOop+BekfMLuWXPLZRT1oj4H9PEZKabrxZw3pXw=="}]},"_npmUser":{"name":"theharsh","email":"mail@theharsh.in"},"directories":{},"maintainers":[{"name":"theharsh","email":"mail@theharsh.in"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/phoenix-react-ui-actionitems_1.0.0_1720791587749_0.17188242046181212"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-12T13:39:47.650Z","1.0.0":"2024-07-12T13:39:47.895Z","modified":"2024-07-12T13:39:48.185Z"},"maintainers":[{"name":"theharsh","email":"mail@theharsh.in"}],"description":"A customizable ActionItems component for React applications, built with MUI.","homepage":"https://github.com/akshay-7span/react-component-library#readme","keywords":["Action Menu","Action Item","mui","react","phoenix","phoenix-react","phoenix-react-ui","7span"],"repository":{"type":"git","url":"git+https://github.com/akshay-7span/react-component-library.git"},"author":{"name":"7span"},"bugs":{"url":"https://github.com/akshay-7span/react-component-library/issues"},"license":"MIT","readme":"# Custom ActionItems  Component\r\n\r\n`ActionItems` is a React component that renders a customizable `menu` using Material-UI's Menu and MenuItem components. It supports displaying a list of menu items with icons and optional dividers between the items.\r\n\r\n\r\n## Features\r\n\r\n- Displays a menu with customizable menu items and icons\r\n- Supports dividers between menu items\r\n- Handles click events for each menu item\r\n\r\n## Installation\r\n\r\nInstall the necessary dependencies:\r\n\r\n```bash\r\nnpm install @mui/material @emotion/react @emotion/styled\r\n```\r\n\r\nInstall the package via npm:\r\n\r\n```bash\r\nnpm install @7span/phoenix-react-ui-actionitems\r\n```\r\n\r\nOr via yarn:\r\n```bash\r\nyarn add @7span/phoenix-react-ui-actionitems\r\n```\r\n\r\n## Usage\r\nHere's a basic example of how to use the custom Sidebar component in your React application:\r\n\r\n```\r\nimport React, { useState } from \"react\";\r\nimport ActionItems from \"@7span/phoenix-react-ui-actionitems\";\r\nimport { Icon1, Icon2 } from \"@mui/icons-material\"; // Replace with your actual icons\r\n\r\nconst MyComponent = () => {\r\n  const [anchorEl, setAnchorEl] = useState(null);\r\n\r\n  const menuItems = [\r\n    {\r\n      name: \"Item 1\",\r\n      icon: Icon1,\r\n      onClick: () => console.log(\"Item 1 clicked\"),\r\n    },\r\n    {\r\n      name: \"Item 2\",\r\n      icon: Icon2,\r\n      onClick: () => console.log(\"Item 2 clicked\"),\r\n    },\r\n  ];\r\n\r\n  const handleClick = (event) => {\r\n    setAnchorEl(event.currentTarget);\r\n  };\r\n\r\n  const handleClose = () => {\r\n    setAnchorEl(null);\r\n  };\r\n\r\n  return (\r\n    <div>\r\n      <button onClick={handleClick}>Open Menu</button>\r\n      <ActionItems anchorEl={anchorEl} setAnchorEl={setAnchorEl} menuItems={menuItems} />\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default MyComponent;\r\n\r\n\r\n```\r\n\r\n## Props\r\n\r\n| Prop          | Type     | Default | Description                                           |\r\n|---------------|----------|---------|-------------------------------------------------------|\r\n| `anchorEl`    | object   | `null`  | The DOM element used to set the position of the menu  |\r\n| `setAnchorEl` | function | `null`  | Function to set the anchor element for the menu       |\r\n| `menuItems`   | array    | `[]`    | Array of menu items to be displayed in the menu       |\r\n\r\n\r\n\r\n## Customization\r\nYou can customize the styles of the ActionItems component and its elements by modifying the sx prop in the component's JSX.\r\n\r\n## Images\r\n| Actions Menu |\r\n|:-:|\r\n|![Action Image](https://github.com/akshay-7span/react-component-library/blob/VS-237/ActionItems/ActionItems.png)|\r\n\r\n## Author\r\n- Harshil Patel\r\n\r\n## Contributing\r\nIf you would like to contribute to the project, please follow these steps:\r\n1. Fork the repository\r\n2. Create a new branch (git checkout -b feature/your-feature)\r\n3. Make your changes\r\n4. Commit your changes (git commit -m 'Add some feature')\r\n5. Push to the branch (git push origin feature/your-feature)\r\n6. Open a Pull Request\r\n\r\n\r\n## License\r\nThis project is licensed under the MIT License\r\n\r\n## Contact\r\nIf you have any questions or suggestions, feel free to open an issue or contact me directly at [yo@7span.com].\r\n\r\n\r\nMade with by 7span\r\n##### This `README.md` file provides comprehensive details about the ActionItems component, including installation instructions, usage examples, prop descriptions, customization options, and the actual component code. Let me know if you need any more adjustments!\r\n\r\n","readmeFilename":"README.md"}