mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[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:
Vendored
+6
-2
@@ -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> {}
|
||||
|
||||
Reference in New Issue
Block a user