import { TrashIcon, DownloadIcon, ReplaceIcon } from "outline-icons"; import { EditorState } from "prosemirror-state"; import * as React from "react"; import { MenuItem } from "@shared/editor/types"; import { Dictionary } from "~/hooks/useDictionary"; export default function attachmentMenuItems( state: EditorState, dictionary: Dictionary ): MenuItem[] { return [ { name: "replaceAttachment", tooltip: dictionary.replaceAttachment, icon: , visible: true, }, { name: "deleteAttachment", tooltip: dictionary.deleteAttachment, icon: , visible: true, }, { name: "separator", }, { name: "downloadAttachment", label: dictionary.download, icon: , visible: !!fetch, }, ]; }