import * as React from "react";
import { Popover, List, ListItem, ListItemIcon, ListItemText, Divider } from "@material-ui/core";
import { DefaultTransformOrigin } from "../popover/helpers";
+import IconBase, { IconTypes } from "../icon/icon";
export interface ContextMenuItem {
name: string;
- icon: string;
+ icon: IconTypes;
}
export type ContextMenuItemGroup = ContextMenuItem[];
key={actionIndex}
onClick={() => onItemClick(item)}>
<ListItemIcon>
- <i className={item.icon} />
+ <IconBase icon={item.icon} />
</ListItemIcon>
<ListItemText>
{item.name}
import { ContextMenuItemGroup } from "../../components/context-menu/context-menu";
import { ContextMenuItemSet } from "./context-menu-item-set";
import actions from "../../store/project/project-action";
+import { IconTypes } from "../../components/icon/icon";
export const projectItemSet: ContextMenuItemSet = {
getItems: () => items,
};
const items: ContextMenuItemGroup[] = [[{
- icon: "fas fa-plus fa-fw",
+ icon: IconTypes.FOLDER,
name: "New project"
}, {
- icon: "fas fa-users fa-fw",
+ icon: IconTypes.ANNOUNCEMENT,
name: "Share"
-}, {
- icon: "fas fa-sign-out-alt fa-fw",
- name: "Move to"
-}, {
- icon: "fas fa-star fa-fw",
- name: "Add to favourite"
-}, {
- icon: "fas fa-edit fa-fw",
- name: "Rename"
-}, {
- icon: "fas fa-copy fa-fw",
- name: "Make a copy"
-}, {
- icon: "fas fa-download fa-fw",
- name: "Download"
-}], [{
- icon: "fas fa-trash-alt fa-fw",
- name: "Remove"
-}
-]];
\ No newline at end of file
+}]];
\ No newline at end of file
import { ContextMenuItemGroup } from "../../components/context-menu/context-menu";
import { ContextMenuItemSet } from "./context-menu-item-set";
import actions from "../../store/project/project-action";
+import { IconTypes } from "../../components/icon/icon";
export const rootProjectItemSet: ContextMenuItemSet = {
getItems: () => items,
};
const items: ContextMenuItemGroup[] = [[{
- icon: "fas fa-plus fa-fw",
+ icon: IconTypes.FOLDER,
name: "New project"
}]];
\ No newline at end of file