mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
refactor(editor): group and expose parameters of createButtonPopper (#10999)
This commit is contained in:
@@ -146,15 +146,14 @@ export class ChatCopyMore extends WithDisposable(LitElement) {
|
||||
this._morePopper?.dispose();
|
||||
this._morePopper = null;
|
||||
} else if (!this._morePopper) {
|
||||
this._morePopper = createButtonPopper(
|
||||
this._moreButton,
|
||||
this._moreMenu,
|
||||
({ display }) => (this._showMoreMenu = display === 'show'),
|
||||
{
|
||||
mainAxis: 0,
|
||||
crossAxis: -100,
|
||||
}
|
||||
);
|
||||
this._morePopper = createButtonPopper({
|
||||
reference: this._moreButton,
|
||||
popperElement: this._moreMenu,
|
||||
stateUpdated: ({ display }) =>
|
||||
(this._showMoreMenu = display === 'show'),
|
||||
mainAxis: 0,
|
||||
crossAxis: -100,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user