UNPKG

@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

65 lines (64 loc) 3.46 kB
import * as React from "react"; import { DisclosureContentHTMLProps, DisclosureContentOptions } from "../disclosure/DisclosureContent"; import { DialogStateReturn } from "./DialogState"; export declare type DialogBackdropOptions = DisclosureContentOptions & Pick<Partial<DialogStateReturn>, "modal"> & { /** * When enabled, user can't scroll on body when the dialog is visible. * This option doesn't work if the dialog isn't modal. */ preventBodyScroll?: boolean; }; export declare type DialogBackdropHTMLProps = DisclosureContentHTMLProps; export declare type DialogBackdropProps = DialogBackdropOptions & DialogBackdropHTMLProps; export declare const useDialogBackdrop: { (options?: DialogBackdropOptions | undefined, htmlProps?: import("reakit").BoxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("reakit").BoxHTMLProps; unstable_propsAreEqual: (prev: import("reakit").BoxOptions & Pick<import("..").DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean | undefined; state: import("../disclosure/helpers").TransitionState; animating: boolean; onEnd: (event: React.SyntheticEvent<Element, Event>) => void; isVisible: boolean; isHidden: boolean; } & Pick<Partial<DialogStateReturn>, "modal"> & { /** * When enabled, user can't scroll on body when the dialog is visible. * This option doesn't work if the dialog isn't modal. */ preventBodyScroll?: boolean | undefined; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; }, next: import("reakit").BoxOptions & Pick<import("..").DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean | undefined; state: import("../disclosure/helpers").TransitionState; animating: boolean; onEnd: (event: React.SyntheticEvent<Element, Event>) => void; isVisible: boolean; isHidden: boolean; } & Pick<Partial<DialogStateReturn>, "modal"> & { /** * When enabled, user can't scroll on body when the dialog is visible. * This option doesn't work if the dialog isn't modal. */ preventBodyScroll?: boolean | undefined; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; }) => boolean; __keys: readonly any[]; __useOptions: (options: DialogBackdropOptions, htmlProps: import("reakit").BoxHTMLProps) => DialogBackdropOptions; }; export declare const DialogBackdrop: import("../system").Component<"div", import("reakit").BoxOptions & Pick<import("..").DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean | undefined; state: import("../disclosure/helpers").TransitionState; animating: boolean; onEnd: (event: React.SyntheticEvent<Element, Event>) => void; isVisible: boolean; isHidden: boolean; } & Pick<Partial<DialogStateReturn>, "modal"> & { /** * When enabled, user can't scroll on body when the dialog is visible. * This option doesn't work if the dialog isn't modal. */ preventBodyScroll?: boolean | undefined; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; }>;