mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
Merge pull request #8192 from isman-usoh/react-holder
add type definitions for react-holder 1.0.0
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
}
|
||||
Vendored
+34
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user