Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robmadole committed May 16, 2024
1 parent 161d6ba commit 773a565
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 14.17.3
python 3.10.1
python 3.9.19 2.7.18
18 changes: 14 additions & 4 deletions src/components/FontAwesomeIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,31 @@ const defaultProps = {
}

const FontAwesomeIcon = React.forwardRef((props, ref) => {
const allProps = {...defaultProps, ...props}
const allProps = { ...defaultProps, ...props }

const iconLookup = normalizeIconArgs(allProps.icon)
const {
icon: iconArgs,
mask: maskArgs,
symbol,
className,
title,
titleId,
maskId
} = allProps

const iconLookup = normalizeIconArgs(iconArgs)

const classes = objectWithKey('classes', [
...classList(allProps),
...allProps.className.split(' ')
...className.split(' ')
])
const transform = objectWithKey(
'transform',
typeof allProps.transform === 'string'
? parse.transform(allProps.transform)
: allProps.transform
)
const mask = objectWithKey('mask', normalizeIconArgs(allProps.mask))
const mask = objectWithKey('mask', normalizeIconArgs(maskArgs))

const renderedIcon = icon(iconLookup, {
...classes,
Expand Down

0 comments on commit 773a565

Please sign in to comment.