mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Change icon interfaces to be more correct * Add tslint.json * Add required compiler option
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import * as React from 'react';
|
|
import { Icon, IconStack, IconProps } 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 />
|
|
|
|
<Icon { ...defaultProps } className="test" onClick={ () => {} } />
|
|
|
|
<DefaultIcon { ...defaultProps } />
|
|
|
|
<IconStack size='lg'>
|
|
<Icon name='circle' stack='2x' />
|
|
<Icon name='flask' stack='1x' inverse />
|
|
</IconStack>
|
|
</div>
|
|
);
|
|
}
|
|
}
|