refactor(editor): group and expose parameters of createButtonPopper (#10999)

This commit is contained in:
L-Sun
2025-03-20 08:37:59 +00:00
parent 6ff19ca307
commit da63d51b7e
8 changed files with 76 additions and 81 deletions

View File

@@ -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,
});
}
}
}