mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
// Type definitions for rmc-drawer 0.4
|
||||
// Project: https://github.com/react-component/m-drawer
|
||||
// Definitions by: Frithjof Winkelmann <https://github.com/Hoff97>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as moment from "moment";
|
||||
import * as React from 'react';
|
||||
|
||||
interface DrawerProps {
|
||||
className?: string;
|
||||
prefixCls?: string;
|
||||
children?: React.ReactNode | React.ReactNode[];
|
||||
style?: React.CSSProperties;
|
||||
sidebarStyle?: React.CSSProperties;
|
||||
contentStyle?: React.CSSProperties;
|
||||
overlayStyle?: React.CSSProperties;
|
||||
dragHandleStyle?: React.CSSProperties;
|
||||
sidebar?: React.ReactNode;
|
||||
onOpenChange?: (open: boolean, overlay?: { overlayClicked: boolean }) => void;
|
||||
open?: boolean;
|
||||
position?: 'left' | 'right' | 'top' | 'bottom';
|
||||
docked?: boolean;
|
||||
transitions?: boolean;
|
||||
touch?: boolean;
|
||||
enableDragHandle?: boolean;
|
||||
dragToggleDistance?: number;
|
||||
}
|
||||
|
||||
declare class Drawer extends React.Component<Partial<DrawerProps>> {
|
||||
}
|
||||
|
||||
export = Drawer;
|
||||
@@ -0,0 +1,19 @@
|
||||
import Drawer from 'rmc-drawer';
|
||||
import * as React from 'react';
|
||||
|
||||
const sidebar = (<div>
|
||||
<h3>
|
||||
sidebar
|
||||
</h3>
|
||||
<p>this is content!</p>
|
||||
</div>);
|
||||
|
||||
const drawer = <Drawer sidebar={sidebar} docked={false} open={false}
|
||||
style={{ overflow: 'auto' }} touch={true} enableDragHandle={true}
|
||||
position="left" dragToggleDistance={30} transitions={true}
|
||||
onOpenChange={_open => {}}>
|
||||
<div className="main">
|
||||
<p>React component</p>
|
||||
Testcontent
|
||||
</div>
|
||||
</Drawer>;
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"rmc-drawer-tests.tsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user