6.0.6 • Published 2 years ago

@types/react-sticky v6.0.6

Weekly downloads
27,669
License
MIT
Repository
github
Last release
2 years ago

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

// Type definitions for react-sticky 6.0
// Project: https://github.com/captivationsoftware/react-sticky
// Definitions by: Matej Lednicky <http://www.thinkcreatix.com/>,
//                 Curtis Warren <https://github.com/curtisw0>,
//                 Andrew Hyndman <https://github.com/ajhyndman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

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: Wed, 07 Jul 2021 18:31:45 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by Matej Lednicky, Curtis Warren, and Andrew Hyndman.

6.0.5

2 years ago

6.0.6

2 years ago

6.0.4

4 years ago

6.0.3

6 years ago

6.0.2

7 years ago

6.0.1

7 years ago

6.0.0

7 years ago

5.0.6

7 years ago

5.0.5

8 years ago

5.0.4

8 years ago

5.0.3

8 years ago

5.0.2

8 years ago

5.0.1

8 years ago

5.0.0

8 years ago