mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-05 08:19:48 +08:00
chore: merge blocksuite source code (#9213)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { html, type TemplateResult } from 'lit';
|
||||
|
||||
import type { MenuConfig } from './menu.js';
|
||||
import type { MenuItemRender } from './types.js';
|
||||
|
||||
export const menuDynamicItems = {
|
||||
dynamic: (config: () => MenuConfig[]) => menu => {
|
||||
const items = menu.renderItems(config());
|
||||
if (!items.length) {
|
||||
return;
|
||||
}
|
||||
const result: TemplateResult = html`${items}`;
|
||||
return result;
|
||||
},
|
||||
} satisfies Record<string, MenuItemRender<never>>;
|
||||
Reference in New Issue
Block a user