mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
22 lines
542 B
TypeScript
22 lines
542 B
TypeScript
import * as React from "react";
|
|
import * as SmoothScrollbar from "react-smooth-scrollbar";
|
|
|
|
<SmoothScrollbar className="test" alwaysShowTracks onScroll={(status, instance) => { } } />;
|
|
<SmoothScrollbar speed={10} overscrollEffect="bounce" />;
|
|
|
|
class Test extends React.Component {
|
|
ref: SmoothScrollbar | null;
|
|
|
|
componentDidMount() {
|
|
if (this.ref) {
|
|
this.ref.scrollbar.scrollTo(0, 500);
|
|
}
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<SmoothScrollbar ref={ref => this.ref = ref} />
|
|
);
|
|
}
|
|
}
|