react-fontawesome (#10804)

* react-fontawesome

* fixed header

* header refixed
This commit is contained in:
timurrustamov
2016-08-30 00:26:11 +09:00
committed by Masahiro Wakame
parent dc77ccd8e1
commit 6ad4abd29d
2 changed files with 59 additions and 0 deletions
@@ -0,0 +1,25 @@
/// <reference path="../react/react.d.ts" />
/// <reference path="../react/react-dom.d.ts" />
/// <reference path="./react-fontawesome.d.ts" />
import * as React from "react";
import * as ReactDOM from "react-dom";
import FontAwesome = require('react-fontawesome');
class TestComponent extends React.Component<{}, {}> {
render() {
return (
<FontAwesome
className='super-crazy-colors'
name="rocket"
size="2x"
spin
style={
{ textShadow: '0 1px 0 rgba(0, 0, 0, 0.1)' }
}
/>
);
}
}
+34
View File
@@ -0,0 +1,34 @@
// Type definitions for react-fontawesome v.1.1.0
// Project: https://github.com/danawoodman/react-fontawesome
// Definitions by: Timur Rustamov <https://github.com/timurrustamov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference path="../react/react.d.ts"/>
declare module "react-fontawesome" {
//Import react
import React = require('react');
type FontAwesomeSize = 'lg' | '2x' | '3x' | '4x' | '5x';
interface FontAwesomeProps {
border?: boolean,
className?: string,
fixedWidth?: boolean,
flip?: boolean,
inverse?: boolean
name: string,
pulse?: boolean,
rotate?: number,
size?: FontAwesomeSize,
spin?: boolean,
stack?: string,
style?: React.CSSProperties
}
class FontAwesome extends React.Component<FontAwesomeProps, {}> {}
export = FontAwesome;
}