react-antd-admin-panel
Version:
Easy prototyping admin panel using React and Antd
27 lines • 1.11 kB
JavaScript
import React, { useEffect } from "react";
import Section from "../../Section";
import { Button, Dropdown } from "antd";
import { EllipsisOutlined } from "@ant-design/icons/lib";
const Actions = ({ parentProps, // Props for the List.tsx
parentModel, // List
section, // Section for the menu
record, // ListItem
}) => {
const menu = (React.createElement(Section, { key: record.key, main: parentProps.main, section: section, args: { list: parentModel, record: record } }));
useEffect(() => {
}, []);
return (React.createElement(Dropdown, { overlay: menu, placement: "bottomCenter" },
React.createElement(Button, { type: 'link', color: 'grey' },
React.createElement(EllipsisOutlined, null))));
};
const handleMenuProps = ({ props, model }) => ({
key: 'menu',
title: '',
width: '10%',
align: 'right',
render: (record) => {
return React.createElement(Actions, { parentProps: props, parentModel: model, section: record._menuSection, record: record });
}
});
export default handleMenuProps;
//# sourceMappingURL=ListMenu.js.map