mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* rewriting the react-fa typings using the new module template from https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/declaration%20files/templates/module.d.ts.md Additionally improving the typings to better reflect the module implementation (and add some type constraints to various props) * bumping version and adding contact info * rewriting a more comprehensive test
32 lines
973 B
TypeScript
32 lines
973 B
TypeScript
import * as React from 'react';
|
|
import { Icon, IconStack } from 'react-fa';
|
|
import DefaultIcon from 'react-fa';
|
|
|
|
export class ReactFATest extends React.Component<any, any> {
|
|
render() {
|
|
const defaultProps = {
|
|
name: 'flask',
|
|
Component: 'div',
|
|
};
|
|
|
|
return (
|
|
<div>
|
|
<Icon { ...defaultProps } />
|
|
<Icon { ...defaultProps } size='lg' />
|
|
<Icon { ...defaultProps } spin />
|
|
<Icon { ...defaultProps } rotate='90' />
|
|
<Icon { ...defaultProps } flip='vertical' />
|
|
<Icon { ...defaultProps } fixedWidth />
|
|
<Icon { ...defaultProps } pulse />
|
|
|
|
<DefaultIcon { ...defaultProps } />
|
|
|
|
<IconStack size='lg'>
|
|
<Icon name='circle' stack='2x' />
|
|
<Icon name='flask' stack='1x' inverse />
|
|
</IconStack>
|
|
</div>
|
|
);
|
|
}
|
|
}
|