DefinitelyTyped/react-sidebar/index.d.ts
Jeroen Vervaeke f56090c1a0 Added type definitions for react-sidebar (#13350)
* Added react-sidebar

* Fixed comments

* Made CSSStyleDeclaration partial

* Added noImplicitThis

* Moved the Typescript version comment

* Fixed typo
2016-12-28 17:43:45 -05:00

35 lines
1.0 KiB
TypeScript

// Type definitions for react-sidebar 2.2
// Project: https://github.com/balloob/react-sidebar#readme
// Definitions by: Jeroen Vervaeke <https://github.com/jeroenvervaeke>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
import { Component } from "react";
export interface SidebarProps {
contentClassName?: string;
docked?: boolean;
dragToggleDistance?: number;
onSetOpen?: () => {};
open?: boolean;
overlayClassName?: string;
pullRight?: boolean;
rootClassName?: string;
shadow?: boolean;
sidebar?: any;
sidebarClassName?: string;
styles?: SidebarStyles;
transitions?: boolean;
touch?: boolean;
touchHandleWidth?: number;
}
export interface SidebarStyles {
content?: Partial<CSSStyleDeclaration>;
dragHandle?: Partial<CSSStyleDeclaration>;
overlay?: Partial<CSSStyleDeclaration>;
root?: Partial<CSSStyleDeclaration>;
sidebar?: Partial<CSSStyleDeclaration>;
}
export default class Sidebar extends Component<SidebarProps, {}> {}