mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 10:22:55 +08:00
refactor(editor): edgeless bookmark toolbar config extension (#10711)
This commit is contained in:
@@ -2,14 +2,11 @@ import {
|
||||
type ToolbarAction,
|
||||
ToolbarContext,
|
||||
} from '@blocksuite/affine-shared/services';
|
||||
import {
|
||||
PropTypes,
|
||||
requiredProperties,
|
||||
ShadowlessElement,
|
||||
} from '@blocksuite/block-std';
|
||||
import { PropTypes, requiredProperties } from '@blocksuite/block-std';
|
||||
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||
import { ArrowDownSmallIcon } from '@blocksuite/icons/lit';
|
||||
import type { ReadonlySignal, Signal } from '@preact/signals-core';
|
||||
import { LitElement } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
import { html } from 'lit-html';
|
||||
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
||||
@@ -20,7 +17,7 @@ import { repeat } from 'lit-html/directives/repeat.js';
|
||||
context: PropTypes.instanceOf(ToolbarContext),
|
||||
viewType$: PropTypes.object,
|
||||
})
|
||||
export class ViewDropdownMenu extends SignalWatcher(ShadowlessElement) {
|
||||
export class ViewDropdownMenu extends SignalWatcher(LitElement) {
|
||||
@property({ attribute: false })
|
||||
accessor actions!: ToolbarAction[];
|
||||
|
||||
@@ -43,6 +40,7 @@ export class ViewDropdownMenu extends SignalWatcher(ShadowlessElement) {
|
||||
.button=${html`
|
||||
<editor-icon-button
|
||||
aria-label="Switch view"
|
||||
.tooltip="${'Switch view'}"
|
||||
.justify="${'space-between'}"
|
||||
.labelHeight="${'20px'}"
|
||||
.iconContainerWidth="${'110px'}"
|
||||
|
||||
Reference in New Issue
Block a user