Skip to content

Commit

Permalink
Added DOMAttributes to FontAwesomeProps (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
baelec authored and robmadole committed Oct 19, 2019
1 parent 9363255 commit b63b1ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference types="react" />
import { CSSProperties } from 'react'
import { CSSProperties, DOMAttributes } from 'react'
import {
Transform,
IconProp,
Expand All @@ -17,7 +17,10 @@ export function FontAwesomeIcon(props: FontAwesomeIconProps): JSX.Element
*/
export type Props = FontAwesomeIconProps

export interface FontAwesomeIconProps {
// This is identical to the version of Omit in Typescript 3.5. It is included for compatibility with older versions of Typescript.
type BackwardCompatibleOmit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;

export interface FontAwesomeIconProps extends BackwardCompatibleOmit<DOMAttributes<SVGSVGElement>, 'children' | 'mask'> {
icon: IconProp
mask?: IconProp
className?: string
Expand Down

0 comments on commit b63b1ed

Please sign in to comment.