[react-fontawesome] Changing props from a type union to an interface (#25483)

* Changing props from a type union to in interface

* Better html extends

* Extending AllHTMLAttributes instead of HTMLAttributes
This commit is contained in:
FaithForHumans
2018-05-04 13:56:22 -07:00
committed by Andy
parent 50660e2820
commit d33b437b8f
+6 -2
View File
@@ -11,12 +11,16 @@ import * as React from 'react';
export = FontAwesome;
interface Intermediate extends React.AllHTMLAttributes<HTMLElement> {
size?: any;
}
declare namespace FontAwesome {
type FontAwesomeSize = 'lg' | '2x' | '3x' | '4x' | '5x';
type FontAwesomeStack = '1x' | '2x';
type FontAwesomeFlip = 'horizontal' | 'vertical';
type FontAwesomeProps = React.HTMLProps<FontAwesome> | {
interface FontAwesomeProps extends Intermediate {
ariaLabel?: string;
border?: boolean;
cssModule?: any;
@@ -30,7 +34,7 @@ declare namespace FontAwesome {
spin?: boolean;
stack?: FontAwesomeStack;
tag?: string;
};
}
}
declare class FontAwesome extends React.Component<FontAwesome.FontAwesomeProps> {}