@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
37 lines (36 loc) • 938 B
TypeScript
import { ReactNode } from "react";
//#region src/hooks/use-lazy-mount/index.d.ts
type LazyBehavior = "keepMounted" | "unmount";
interface UseLazyMountProps {
children?: ReactNode;
/**
* If `true`, rendering of the content will be deferred until it is selected.
*
* @default false
*/
lazy?: boolean;
/**
* The lazy behavior of content when not active. Only works when `lazy={true}`.
*
* - `unmount`: The content is always unmounted.
* - `keepMounted`: The content is initially unmounted, but stays mounted when selected.
*
* @default 'unmount'
*/
lazyBehavior?: LazyBehavior;
/**
* If `true`, the content is mounted.
*
* @default false
*/
mounted?: boolean;
}
declare const useLazyMount: ({
children,
lazy,
lazyBehavior,
mounted
}: UseLazyMountProps) => ReactNode;
//#endregion
export { LazyBehavior, UseLazyMountProps, useLazyMount };
//# sourceMappingURL=index.d.ts.map