import { Menu, Modal, Text } from '@mantine/core'; import { showNotification } from '@mantine/notifications'; import { useState } from 'react'; import { Check, Edit, Trash } from 'tabler-icons-react'; import { AddAppShelfItemForm } from './AddAppShelfItem'; export default function AppShelfMenu(props: any) { const { service, removeitem: removeItem } = props; const [opened, setOpened] = useState(false); return ( <> setOpened(false)} title="Modify a service" > Settings } // TODO: #2 Add the ability to edit the service. onClick={() => setOpened(true)} > Edit Danger zone { removeItem(service.name); showNotification({ autoClose: 5000, title: ( Service {service.name} removed successfully ), color: 'green', icon: , message: undefined, }); }} icon={} > Delete ); }