3.3.9 • Published 6 months ago

@types/react-scrollspy v3.3.9

Weekly downloads
7,112
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/react-scrollspy

Summary

This package contains type definitions for react-scrollspy (https://github.com/makotot/react-scrollspy).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-scrollspy.

index.d.ts

// Type definitions for react-scrollspy 3.3
// Project: https://github.com/makotot/react-scrollspy
// Definitions by: Zhang Yi Jiang <https://github.com/ZhangYiJiang>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import * as React from 'react';

export interface ScrollspyProps {
    children?: React.ReactNode;

    // Array of target element IDs
    items: ReadonlyArray<string>;

    // Class name that apply to the navigation element paired with the content element in viewport
    currentClassName: string;

    // Class name that apply to the navigation elements that have been scrolled past
    scrolledPastClassName?: string | undefined;

    // HTML tag for Scrollspy component if you want to use other than ul
    componentTag?: string | React.ComponentType | undefined;

    // Style attribute to be passed to the generated <ul /> element
    style?: React.CSSProperties | undefined;

    // Offset value that adjusts to determine the elements are in the viewport
    offset?: number | undefined;

    // Selector for the element of scrollable container that can be used with querySelector
    rootEl?: string | undefined;

    // Function to be executed when the active item has been updated
    onUpdate?: ((item: HTMLElement) => void) | undefined;

    // ClassName attribute to be passed to the generated <ul /> element
    className?: string | undefined;
}

export default class Scrollspy extends React.Component<ScrollspyProps> {
    // Add event listener of scrollspy.
    onEvent(): void;

    // Remove event listener of scrollspy.
    offEvent(): void;
}

Additional Details

  • Last updated: Thu, 07 Oct 2021 22:31:32 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by Zhang Yi Jiang.

3.3.9

6 months ago

3.3.8

6 months ago

3.3.7

7 months ago

3.3.6

8 months ago

3.3.5

3 years ago

3.3.4

3 years ago

3.3.3

4 years ago

3.3.2

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago