@types/react-sticky
TypeScript icon, indicating that this package has built-in type declarations

6.0.6 • Public • Published

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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-sticky

Weekly Downloads

42,266

Version

6.0.6

License

MIT

Unpacked Size

4.83 kB

Total Files

5

Last publish

Collaborators

  • types