ProfileMenuButton: use self-built Menu
All checks were successful
/ depoly (push) Successful in 1m20s

This commit is contained in:
thislight 2024-11-19 17:03:56 +08:00
parent 0a9d833f09
commit 4190b8847d
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
2 changed files with 11 additions and 33 deletions

View file

@ -14,6 +14,7 @@ import {
animateGrowFromTopRight,
animateShrinkToTopRight,
} from "../platform/anim";
import type { MenuListProps } from "@suid/material/MenuList";
export type Anchor = Pick<DOMRect, "top" | "left" | "right"> & { e?: number };
@ -22,6 +23,7 @@ export type MenuProps = ParentProps<
open?: boolean;
onClose?: JSX.EventHandlerUnion<HTMLDialogElement, Event>;
anchor: () => Anchor;
MenuListProps?: MenuListProps;
id?: string;
} & JSX.AriaAttributes
@ -213,11 +215,8 @@ const Menu: Component<MenuProps> = (props) => {
tabIndex={-1}
{...rest}
>
<div
class="container"
role="presentation"
>
<MenuList>{props.children}</MenuList>
<div class="container" role="presentation">
<MenuList {...props.MenuListProps}>{props.children}</MenuList>
</div>
</dialog>
);