UNPKG

reakit

Version:

Toolkit for building accessible rich web apps with React

34 lines (33 loc) 3.1 kB
import * as React from "react"; import { PopoverDisclosureOptions, PopoverDisclosureHTMLProps } from "../Popover/PopoverDisclosure"; import { MenuStateReturn } from "./MenuState"; export declare type MenuButtonOptions = PopoverDisclosureOptions & Pick<Partial<MenuStateReturn>, "hide" | "unstable_popoverStyles" | "unstable_arrowStyles" | "currentId" | "unstable_moves" | "move"> & Pick<MenuStateReturn, "show" | "placement" | "first" | "last">; export declare type MenuButtonHTMLProps = PopoverDisclosureHTMLProps; export declare type MenuButtonProps = MenuButtonOptions & MenuButtonHTMLProps; export declare const useMenuButton: { (options?: MenuButtonOptions | undefined, htmlProps?: import("..").ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").ButtonHTMLProps; unstable_propsAreEqual: (prev: import("..").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<Partial<import("..").DisclosureStateReturn>, "visible"> & Pick<import("..").DisclosureStateReturn, "toggle" | "baseId"> & Pick<Partial<import("..").DialogStateReturn>, "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "toggle"> & Pick<Partial<import("..").PopoverStateReturn>, "unstable_referenceRef"> & Pick<Partial<MenuStateReturn>, "hide" | "move" | "currentId" | "unstable_moves" | "unstable_popoverStyles" | "unstable_arrowStyles"> & Pick<MenuStateReturn, "show" | "first" | "last" | "placement"> & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; } & { disabled?: boolean | undefined; } & React.ButtonHTMLAttributes<any>, next: import("..").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<Partial<import("..").DisclosureStateReturn>, "visible"> & Pick<import("..").DisclosureStateReturn, "toggle" | "baseId"> & Pick<Partial<import("..").DialogStateReturn>, "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "toggle"> & Pick<Partial<import("..").PopoverStateReturn>, "unstable_referenceRef"> & Pick<Partial<MenuStateReturn>, "hide" | "move" | "currentId" | "unstable_moves" | "unstable_popoverStyles" | "unstable_arrowStyles"> & Pick<MenuStateReturn, "show" | "first" | "last" | "placement"> & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; } & { disabled?: boolean | undefined; } & React.ButtonHTMLAttributes<any>) => boolean; __keys: readonly any[]; __useOptions: (options: MenuButtonOptions, htmlProps: import("..").ButtonHTMLProps) => MenuButtonOptions; }; export declare const MenuButton: import("reakit-system/ts/createComponent").Component<"button", MenuButtonOptions>;