TootFilterButton: show the menu in the click pos

This commit is contained in:
thislight 2024-11-03 18:24:10 +08:00
parent c69d54e171
commit 06e988e0e5
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
2 changed files with 18 additions and 21 deletions

View file

@ -13,10 +13,12 @@ import {
animateShrinkToTopRight,
} from "../platform/anim";
type Anchor = Pick<DOMRect, "top" | "left" | "right">
type Props = {
open?: boolean;
onClose?: JSX.EventHandlerUnion<HTMLDialogElement, Event>;
anchor: () => DOMRect;
anchor: () => Anchor;
};
function px(n?: number) {