mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
react-fontawesome (#10804)
* react-fontawesome * fixed header * header refixed
This commit is contained in:
committed by
Masahiro Wakame
parent
dc77ccd8e1
commit
6ad4abd29d
@@ -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
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user