mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-03 03:55:56 +01:00
Edit AppShelfMenu
Preparing to add an Edit button
This commit is contained in:
@@ -1,13 +1,25 @@
|
|||||||
import { Menu, Text } from '@mantine/core';
|
import { Menu, Text } from '@mantine/core';
|
||||||
import { showNotification } from '@mantine/notifications';
|
import { showNotification } from '@mantine/notifications';
|
||||||
import { Check, Trash } from 'tabler-icons-react';
|
import { Check, Edit, Trash } from 'tabler-icons-react';
|
||||||
|
|
||||||
export default function AppShelfMenu(props: any) {
|
export default function AppShelfMenu(props: any) {
|
||||||
const { name, removeitem: removeItem } = props;
|
const { name, removeitem: removeItem } = props;
|
||||||
return (
|
return (
|
||||||
<Menu sx={{ position: 'absolute', top: 3, right: 3 }}>
|
<Menu sx={{ position: 'absolute', top: 3, right: 3 }}>
|
||||||
<Menu.Label>Settings</Menu.Label>
|
<Menu.Label>Settings</Menu.Label>
|
||||||
|
<Menu.Item
|
||||||
|
color="primary"
|
||||||
|
icon={<Edit size={14} />}
|
||||||
|
onClick={() => {
|
||||||
|
showNotification({
|
||||||
|
color: 'red',
|
||||||
|
title: <Text>Feature not yet implemented</Text>,
|
||||||
|
message: `${name} could not be edited`,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Rename
|
||||||
|
</Menu.Item>
|
||||||
<Menu.Label>Danger zone</Menu.Label>
|
<Menu.Label>Danger zone</Menu.Label>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
color="red"
|
color="red"
|
||||||
|
|||||||
Reference in New Issue
Block a user