mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
@@ -33,6 +33,12 @@ type Props = {
|
||||
align?: "start" | "end";
|
||||
/** ARIA label for the menu */
|
||||
ariaLabel: string;
|
||||
/**
|
||||
* Whether the menu should lock page scroll and trap focus while open.
|
||||
* Defaults to true. Set to false to avoid the scrollbar-removal layout
|
||||
* shift when the menu lives inside a scrollable container.
|
||||
*/
|
||||
modal?: boolean;
|
||||
/** Additional component to display at the bottom of the top-level menu */
|
||||
append?: React.ReactNode;
|
||||
/** Callback when menu is opened */
|
||||
@@ -50,6 +56,7 @@ export const DropdownMenu = observer(
|
||||
children,
|
||||
align = "start",
|
||||
ariaLabel,
|
||||
modal = true,
|
||||
append,
|
||||
onOpen,
|
||||
onClose,
|
||||
@@ -116,7 +123,7 @@ export const DropdownMenu = observer(
|
||||
|
||||
return (
|
||||
<MenuProvider variant="dropdown">
|
||||
<Menu open={open} onOpenChange={handleOpenChange}>
|
||||
<Menu open={open} onOpenChange={handleOpenChange} modal={modal}>
|
||||
<MenuTrigger ref={ref} aria-label={ariaLabel} {...rest}>
|
||||
{children}
|
||||
</MenuTrigger>
|
||||
|
||||
@@ -91,6 +91,7 @@ function CommentMenu({
|
||||
action={rootAction}
|
||||
align="end"
|
||||
ariaLabel={t("Comment options")}
|
||||
modal={false}
|
||||
>
|
||||
<OverflowMenuButton className={className} />
|
||||
</DropdownMenu>
|
||||
|
||||
Reference in New Issue
Block a user