@renderlesskit/react
Version:
Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit
70 lines (69 loc) • 3.95 kB
TypeScript
import React from "react";
import { ButtonHTMLProps, ButtonOptions } from "reakit";
import { DisclosureStateReturn } from "./DisclosureState";
export declare type DisclosureOptions = ButtonOptions & Pick<DisclosureStateReturn, "baseId" | "toggle" | "visible">;
export declare type DisclosureHTMLProps = ButtonHTMLProps;
export declare type DisclosureProps = DisclosureOptions & DisclosureHTMLProps;
export declare const disclosureComposableButton: (newOptions?: import("../system").CreateHook<DisclosureOptions, ButtonHTMLProps> | undefined) => {
(options?: DisclosureOptions | undefined, htmlProps?: ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("reakit").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<DisclosureStateReturn, "baseId" | "visible" | "toggle"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.ButtonHTMLAttributes<any>, next: import("reakit").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<DisclosureStateReturn, "baseId" | "visible" | "toggle"> & 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: DisclosureOptions, htmlProps: ButtonHTMLProps) => DisclosureOptions;
};
export declare const useDisclosure: {
(options?: DisclosureOptions | undefined, htmlProps?: ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("reakit").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<DisclosureStateReturn, "baseId" | "visible" | "toggle"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.ButtonHTMLAttributes<any>, next: import("reakit").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<DisclosureStateReturn, "baseId" | "visible" | "toggle"> & 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: DisclosureOptions, htmlProps: ButtonHTMLProps) => DisclosureOptions;
};
export declare const Disclosure: import("reakit-system").Component<"button", import("reakit").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<DisclosureStateReturn, "baseId" | "visible" | "toggle"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.ButtonHTMLAttributes<any>>;