DefinitelyTyped/types/react-smooth-scrollbar/index.d.ts
Ferdy Budhidharma bc0c933415 feat(react-dependents): update to TS 2.8 (part 2 of 2) (#27744)
* feat(react-dependents): update to ts 2.8

* fix version mismatches

* remove package.json

* post merge updates

* add package.json back again
2018-08-06 06:28:42 +01:00

42 lines
1.2 KiB
TypeScript

// Type definitions for react-smooth-scrollbar 8.0
// Project: https://github.com/idiotWu/react-smooth-scrollbar
// Definitions by: Alexey Svetliakov <https://github.com/asvetliakov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
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> {
/**
* Pipe to scrollbar.addListener()
*/
onScroll?(status: ScrollStatus, scrollbarInstance: SmoothScrollbar): void;
/**
* Keep scrollbar tracks visible whether it's scrolling or not
* @default false
*/
alwaysShowTracks?: boolean;
/**
* Optional class name
*/
className?: string;
/**
* Optional style
*/
style?: React.CSSProperties;
}
}
declare class Scrollbar extends React.Component<Scrollbar.ScrollbarProps> {
/**
* Scrollbar instance
*/
readonly scrollbar: SmoothScrollbar;
}
export as namespace Scrollbar;
export = Scrollbar;