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

8.0.6 • Public • Published

Installation

npm install --save @types/react-smooth-scrollbar

Summary

This package contains type definitions for react-smooth-scrollbar (https://github.com/idiotWu/react-smooth-scrollbar).

Details

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

index.d.ts

import * as React from "react";
import SmoothScrollbar from "smooth-scrollbar";
import { ScrollbarOptions, ScrollStatus } from "smooth-scrollbar/interfaces";

declare namespace Scrollbar {
    interface ScrollbarProps extends Partial<ScrollbarOptions> {
        children?: React.ReactNode;
        /**
         * Pipe to scrollbar.addListener()
         */
        onScroll?(status: ScrollStatus, scrollbarInstance: SmoothScrollbar): void;
        /**
         * Keep scrollbar tracks visible whether it's scrolling or not
         * @default false
         */
        alwaysShowTracks?: boolean | undefined;
        /**
         * Optional class name
         */
        className?: string | undefined;
        /**
         * Optional style
         */
        style?: React.CSSProperties | undefined;
    }
}

declare class Scrollbar extends React.Component<Scrollbar.ScrollbarProps> {
    /**
     * Scrollbar instance
     */
    readonly scrollbar: SmoothScrollbar;
}

export as namespace Scrollbar;
export = Scrollbar;

Additional Details

Credits

These definitions were written by Alexey Svetliakov.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-smooth-scrollbar

Weekly Downloads

1,225

Version

8.0.6

License

MIT

Unpacked Size

4.9 kB

Total Files

5

Last publish

Collaborators

  • types