import { FC } from 'react'; import { Button, Dropdown, Menu, Space } from 'antd'; import { DownOutlined, StarOutlined } from '@ant-design/icons'; import styles from './ActionButtonMenu.module.scss'; import { ExternalAction } from '../../../interfaces/external-action'; export type ActionButtonMenuProps = { actions: ExternalAction[]; externalActionSelected: (action: ExternalAction) => void; }; export const ActionButtonMenu: FC = ({ actions, externalActionSelected, }) => { const onMenuClick = a => { const action = actions.find(x => x.url === a.key); externalActionSelected(action); }; const items = actions.map(action => ({ key: action.url, label: ( {action.icon && {action.title}}{' '} {action.title} ), })); const menu = ; return (
); };