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
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/react, smooth-scrollbar
Credits
These definitions were written by Alexey Svetliakov.