UNPKG

@types/react-sticky

Version:
51 lines (41 loc) 1.68 kB
# 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. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-sticky/index.d.ts) ````ts 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](https://npmjs.com/package/@types/react) # Credits These definitions were written by [Matej Lednicky](http://www.thinkcreatix.com/), [Curtis Warren](https://github.com/curtisw0), and [Andrew Hyndman](https://github.com/ajhyndman).