mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Initial typings for react-scrollbar (#9185)
* Initial typings for react-scrollbar * Fixed tests
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/// <reference path="react-scrollbar.d.ts" />
|
||||
/// <reference path="../react/react.d.ts" />
|
||||
|
||||
import ScrollArea = require('react-scrollbar');
|
||||
import * as React from 'react';
|
||||
|
||||
let scrollArea = <ScrollArea
|
||||
speed={0.8}
|
||||
className="area"
|
||||
contentClassName="content"
|
||||
horizontal={false}
|
||||
>
|
||||
<div>Some long content.</div>
|
||||
</ScrollArea>;
|
||||
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
// Type definitions for react-scrollbar 0.4.1
|
||||
// Project: https://github.com/souhe/reactScrollbar
|
||||
// Definitions by: Stephen Jelfs <https://github.com/stephenjelfs>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../react/react.d.ts" />
|
||||
|
||||
declare module "react-scrollbar" {
|
||||
interface ScrollAreaProps extends __React.Props<ScrollArea> {
|
||||
className?: string,
|
||||
style?: __React.CSSProperties,
|
||||
speed?: number,
|
||||
contentClassName?: string,
|
||||
contentStyle?: __React.CSSProperties,
|
||||
vertical?: boolean,
|
||||
verticalContainerStyle?: __React.CSSProperties,
|
||||
verticalScrollbarStyle?: __React.CSSProperties,
|
||||
horizontal?: boolean,
|
||||
horizontalContainerStyle?: __React.CSSProperties,
|
||||
horizontalScrollbarStyle?: __React.CSSProperties,
|
||||
onScroll?: (value: {leftPosition: number, topPosition: number, containerHeight: number, containerWidth: number, realHeight: number, realWidth: number}) => void,
|
||||
contentWindow?: any,
|
||||
ownerDocument?: any,
|
||||
smoothScrolling?: boolean
|
||||
minScrollSize?: number,
|
||||
swapWheelAxes?: boolean
|
||||
}
|
||||
|
||||
class ScrollArea extends __React.Component<ScrollAreaProps, {}> {}
|
||||
|
||||
export = ScrollArea;
|
||||
}
|
||||
Reference in New Issue
Block a user