diff --git a/src/material/Menu.tsx b/src/material/Menu.tsx index 5cae4e2..916fc76 100644 --- a/src/material/Menu.tsx +++ b/src/material/Menu.tsx @@ -30,6 +30,24 @@ function px(n?: number) { } } +/** + * Create managed state for {@link Menu}. This function + * expose an "open" closure for you to open the menu. The + * opening and closing is automatically managed internally. + * + * @returns The first element is the "open" closure, calls + * with anchor infomation to open the menu. + * The second element is the state props for {@link Menu}, use + * spread syntax to set the props. + * @example + * ````tsx + * const [openMenu, menuState] = createManagedMenuState(); + * + * + * + *