UNPKG

react-sticky-box

Version:
12 lines (11 loc) 611 B
import { ComponentProps } from "react"; export type StickyBoxConfig = { offsetTop?: number; offsetBottom?: number; bottom?: boolean; }; export type UseStickyBoxOptions = StickyBoxConfig; export declare const useStickyBox: ({ offsetTop, offsetBottom, bottom, }?: StickyBoxConfig) => import("react").Dispatch<import("react").SetStateAction<HTMLElement | null>>; export type StickyBoxCompProps = StickyBoxConfig & Pick<ComponentProps<"div">, "children" | "className" | "style">; declare const StickyBox: (props: StickyBoxCompProps) => import("react/jsx-runtime").JSX.Element; export default StickyBox;