Merge pull request #8192 from isman-usoh/react-holder

add type definitions for react-holder 1.0.0
This commit is contained in:
Masahiro Wakame
2016-02-26 19:07:50 +09:00
2 changed files with 59 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
// react-holder test
///<reference path="react-holder.d.ts"/>
///<reference path="../react/react.d.ts"/>
import * as React from "react";
import Holder from "react-holder";
export class ReactHolderTest extends React.Component<any, any> {
public render() {
return (
<div>
<Holder
// width and height can be a number or a string
width="100%"
height="200px"
// default: false
updateOnResize={true}
className={'my-custom-class'}
/>
</div>
);
}
}
+34
View File
@@ -0,0 +1,34 @@
// Type definitions for react-holder 1.0.0
// Project: https://github.com/Moeriki/react-holder
// Definitions by: Isman Usoh <https://github.com/isman-usoh>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../react/react.d.ts"/>
declare module "react-holder" {
import React = __React;
interface ReactHolderProp extends React.HTMLProps<ReactHolder> {
width: string | number;
height: string | number;
updateOnResize: boolean;
// config args
theme?: string;
random?: boolean;
bg?: string
fg?: string;
text?: string;
size?: number;
font?: string;
align?: string;
outline?: boolean;
lineWrap?: number;
}
class ReactHolder extends React.Component<ReactHolderProp, any> {
}
export default ReactHolder;
}