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

73 lines (72 loc) 3.94 kB
import * as React from "react"; import { BoxHTMLProps, BoxOptions } from "reakit"; import { DisclosureStateReturn } from "./DisclosureState"; import { TransitionState, useAnimationReturnType } from "./helpers"; export declare type DisclosureContentOptions = BoxOptions & Pick<DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean; state: TransitionState; animating: useAnimationReturnType["animating"]; onEnd: useAnimationReturnType["onEnd"]; isVisible: boolean; isHidden: boolean; }; export declare type DisclosureContentHTMLProps = BoxHTMLProps; export declare type DisclosureContentProps = DisclosureContentOptions & DisclosureContentHTMLProps; export declare const disclosureComposableContent: (newOptions?: import("../system").CreateHook<DisclosureContentOptions, BoxHTMLProps> | undefined) => { (options?: DisclosureContentOptions | undefined, htmlProps?: BoxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): BoxHTMLProps; unstable_propsAreEqual: (prev: BoxOptions & Pick<DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean | undefined; state: TransitionState; animating: useAnimationReturnType["animating"]; onEnd: useAnimationReturnType["onEnd"]; isVisible: boolean; isHidden: boolean; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; }, next: BoxOptions & Pick<DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean | undefined; state: TransitionState; animating: useAnimationReturnType["animating"]; onEnd: useAnimationReturnType["onEnd"]; isVisible: boolean; isHidden: boolean; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; }) => boolean; __keys: readonly any[]; __useOptions: (options: DisclosureContentOptions, htmlProps: BoxHTMLProps) => DisclosureContentOptions; }; export declare const useDisclosureContent: { (options?: DisclosureContentOptions | undefined, htmlProps?: BoxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): BoxHTMLProps; unstable_propsAreEqual: (prev: BoxOptions & Pick<DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean | undefined; state: TransitionState; animating: useAnimationReturnType["animating"]; onEnd: useAnimationReturnType["onEnd"]; isVisible: boolean; isHidden: boolean; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; }, next: BoxOptions & Pick<DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean | undefined; state: TransitionState; animating: useAnimationReturnType["animating"]; onEnd: useAnimationReturnType["onEnd"]; isVisible: boolean; isHidden: boolean; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; }) => boolean; __keys: readonly any[]; __useOptions: (options: DisclosureContentOptions, htmlProps: BoxHTMLProps) => DisclosureContentOptions; }; export declare const DisclosureContent: import("reakit-system").Component<"div", BoxOptions & Pick<DisclosureStateReturn, "baseId" | "visible"> & { animationPresent?: boolean | undefined; state: TransitionState; animating: useAnimationReturnType["animating"]; onEnd: useAnimationReturnType["onEnd"]; isVisible: boolean; isHidden: boolean; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; }>;