mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Merge pull request #14545 from ruslanchek/master
react-custom-scrollbars added
This commit is contained in:
commit
53869592fe
58
react-custom-scrollbars/index.d.ts
vendored
Normal file
58
react-custom-scrollbars/index.d.ts
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
// Type definitions for react-css-transition-replace 2.0.1
|
||||
// Project: https://github.com/malte-wessel/react-custom-scrollbars
|
||||
// Definitions by: David-LeBlanc-git <https://github.com/David-LeBlanc-git>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
declare module "react-custom-scrollbars" {
|
||||
export interface positionValues {
|
||||
top: number;
|
||||
left: number;
|
||||
clientWidth: number;
|
||||
clientHeight: number;
|
||||
scrollWidth: number;
|
||||
scrollHeight: number;
|
||||
scrollLeft: number;
|
||||
scrollTop: number;
|
||||
}
|
||||
|
||||
export interface ScrollbarProps extends React.HTMLProps<Scrollbars> {
|
||||
onScroll?: React.UIEventHandler<any>;
|
||||
onScrollFrame?: (values: positionValues) => void;
|
||||
onScrollStart?: () => void;
|
||||
onScrollStop?: () => void;
|
||||
onUpdate?: (values: positionValues) => void;
|
||||
|
||||
renderView?: React.StatelessComponent<any>;
|
||||
renderTrackHorizontal?: React.StatelessComponent<any>;
|
||||
renderTrackVertical?: React.StatelessComponent<any>;
|
||||
renderThumbHorizontal?: React.StatelessComponent<any>;
|
||||
renderThumbVertical?: React.StatelessComponent<any>;
|
||||
|
||||
autoHide?: boolean;
|
||||
autoHideTimeout?: number;
|
||||
autoHideDuration?: number;
|
||||
|
||||
thumbSize?: number;
|
||||
thumbMinSize?: number;
|
||||
universal?: boolean;
|
||||
}
|
||||
|
||||
export default class Scrollbars extends React.Component<ScrollbarProps, {}> {
|
||||
scrollTop(top: number): void;
|
||||
scrollLeft(left: number): void;
|
||||
scrollToTop(): void;
|
||||
scrollToBottom(): void;
|
||||
scrollToLeft(): void;
|
||||
scrollToRight(): void;
|
||||
getScrollLeft(): number;
|
||||
getScrollTop(): number;
|
||||
getScrollWidth(): number;
|
||||
getScrollHeight(): number;
|
||||
getWidth(): number;
|
||||
getHeight(): number;
|
||||
getValues(): positionValues;
|
||||
}
|
||||
}
|
||||
10
react-custom-scrollbars/react-custom-scrollbars-tests.tsx
Normal file
10
react-custom-scrollbars/react-custom-scrollbars-tests.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import * as React from "react"
|
||||
import { render } from 'react-dom';
|
||||
import Scrollbars from "react-custom-scrollbars"
|
||||
|
||||
render(
|
||||
<Scrollbars>
|
||||
<div>Test</div>
|
||||
</Scrollbars>,
|
||||
document.getElementById("main")
|
||||
)
|
||||
24
react-custom-scrollbars/tsconfig.json
Normal file
24
react-custom-scrollbars/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-custom-scrollbars-tests.tsx"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user