import { useState } from 'react'; import { IActionMenuProps } from './IActionMenuProps'; import { IconButton, Icon, IconName, Dropdown } from '@noahspan/noahspan-components'; import { FormMode } from '../../enums/formMode'; import { useAuth } from 'react-oidc-context'; const ActionMenu = ({ id, onDelete, onOpenCloseForm, onOpenCloseTracks }: IActionMenuProps) => { // const [anchorElAction, setAnchorElAction] = useState( // null // ); // const auth = useAuth(); // const onOpenActionMenu = (event: React.MouseEvent) => { // setAnchorElAction(event.currentTarget); // }; // const onCloseActionMenu = () => { // setAnchorElAction(null); // }; const options = [ 'Item 1', 'Item 2' ] return ( <> console.log('clicked!')} options={options} > //
// // // // // {auth.isAuthenticated && // <> // onOpenCloseForm(FormMode.EDIT, id)}> // // // // Edit // // {onOpenCloseTracks && // onOpenCloseTracks!(FormMode.EDIT, id)}> // // // // Tracks // // } // // } // onOpenCloseForm(FormMode.VIEW, id)}> // // // // View // // {auth.isAuthenticated && // <> //
// onDelete(id)}> // // // // Delete // // // } //
//
); }; export default ActionMenu;