chore: Refactors towards shared menu component (#4445)

This commit is contained in:
Tom Moor
2022-11-19 13:15:38 -08:00
committed by GitHub
parent 924b554281
commit ae6855f3df
21 changed files with 186 additions and 194 deletions

View File

@@ -1,8 +1,8 @@
import { findParentNode } from "prosemirror-utils";
import React from "react";
import getMenuItems from "../menus/block";
import BlockMenuItem from "./BlockMenuItem";
import CommandMenu, { Props } from "./CommandMenu";
import CommandMenuItem from "./CommandMenuItem";
type BlockMenuProps = Omit<
Props,
@@ -26,7 +26,7 @@ function BlockMenu(props: BlockMenuProps) {
filterable={true}
onClearSearch={clearSearch}
renderMenuItem={(item, _index, options) => (
<BlockMenuItem
<CommandMenuItem
onClick={options.onClick}
selected={options.selected}
icon={item.icon}