Installation
npm install --save @types/react-sticky
Summary
This package contains type definitions for react-sticky (https://github.com/captivationsoftware/react-sticky).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-sticky.
import * as React from "react";
export const StickyContainer: React.ComponentClass<
React.HTMLAttributes<HTMLDivElement>
>;
export interface StickyChildArgs {
style: React.CSSProperties;
isSticky: boolean;
wasSticky: boolean;
distanceFromTop: number;
distanceFromBottom: number;
calculatedHeight: number;
}
export interface StickyProps {
children: (args: StickyChildArgs) => React.ReactElement;
relative?: boolean | undefined;
isActive?: boolean | undefined;
className?: string | undefined;
style?: any;
stickyClassName?: string | undefined;
stickyStyle?: any;
topOffset?: number | undefined;
bottomOffset?: number | undefined;
onStickyStateChange?(isSticky: boolean): void;
disableCompensation?: boolean | undefined;
disableHardwareAcceleration?: boolean | undefined;
}
export const Sticky: React.ComponentClass<StickyProps>;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/react
Credits
These definitions were written by Matej Lednicky, Curtis Warren, and Andrew Hyndman.