Skip to content

Commit 0683a1b

Browse files
committed
Release 0.1.14
1 parent acbf6f1 commit 0683a1b

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
---
88

9+
## [0.1.14](https://github.com/FortAwesome/react-fontawesome/releases/tag/0.1.14) - 2020-12-22
10+
11+
### Added
12+
13+
- Support for the new parse.icon function from the Font Awesome version 6 @fortawesome/fontawesome-svg-core
14+
15+
---
16+
917
## [0.1.13](https://github.com/FortAwesome/react-fontawesome/releases/tag/0.1.13) - 2020-11-23
1018

1119
### Fixed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
> Font Awesome 5 React component using SVG with JS
1010
1111
<!-- toc -->
12+
1213
- [Documentation](#documentation)
1314
- [How to Help](#how-to-help)
1415
- [Contributors](#contributors)
@@ -63,6 +64,8 @@ The Font Awesome team:
6364
| <img src="https://github.com/robmadole.png?size=72" /> | Rob Madole | [@robmadole](https://github.com/robmadole) |
6465
| <img src="https://github.com/mlwilkerson.png?size=72" /> | Mike Wilkerson | [@mlwilkerson](https://github.com/mlwilkerson) |
6566
| <img src="https://github.com/talbs.png?size=72" /> | Brian Talbot | [@talbs](https://github.com/talbs) |
67+
| <img src="https://github.com/talbs.png?size=72" /> | Brian Talbot | [@talbs](https://github.com/talbs) |
68+
| <img src="https://github.com/jasonlundien.png?size=72" /> | Jason Lundien | [@jasonlundien](https://github.com/jasonlundien) |
6669

6770
## Releasing this project (only project owners can do this)
6871

index.es.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,12 @@ function log () {
259259
}
260260
}
261261

262-
// Normalize icon arguments
263262
function normalizeIconArgs(icon) {
264-
// if the icon is null, there's nothing to do
263+
if (parse.icon) {
264+
return parse.icon(icon);
265+
} // if the icon is null, there's nothing to do
266+
267+
265268
if (icon === null) {
266269
return null;
267270
} // if the icon is an object and has a prefix and an icon name, return it
@@ -308,14 +311,16 @@ function FontAwesomeIcon(_ref) {
308311
maskArgs = props.mask,
309312
symbol = props.symbol,
310313
className = props.className,
311-
title = props.title;
314+
title = props.title,
315+
titleId = props.titleId;
312316
var iconLookup = normalizeIconArgs(iconArgs);
313317
var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(props)), _toConsumableArray(className.split(' '))));
314318
var transform = objectWithKey('transform', typeof props.transform === 'string' ? parse.transform(props.transform) : props.transform);
315319
var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));
316320
var renderedIcon = icon(iconLookup, _objectSpread2({}, classes, {}, transform, {}, mask, {
317321
symbol: symbol,
318-
title: title
322+
title: title,
323+
titleId: titleId
319324
}));
320325

321326
if (!renderedIcon) {

index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,12 @@
264264
}
265265
}
266266

267-
// Normalize icon arguments
268267
function normalizeIconArgs(icon) {
269-
// if the icon is null, there's nothing to do
268+
if (fontawesomeSvgCore.parse.icon) {
269+
return fontawesomeSvgCore.parse.icon(icon);
270+
} // if the icon is null, there's nothing to do
271+
272+
270273
if (icon === null) {
271274
return null;
272275
} // if the icon is an object and has a prefix and an icon name, return it
@@ -313,14 +316,16 @@
313316
maskArgs = props.mask,
314317
symbol = props.symbol,
315318
className = props.className,
316-
title = props.title;
319+
title = props.title,
320+
titleId = props.titleId;
317321
var iconLookup = normalizeIconArgs(iconArgs);
318322
var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(props)), _toConsumableArray(className.split(' '))));
319323
var transform = objectWithKey('transform', typeof props.transform === 'string' ? fontawesomeSvgCore.parse.transform(props.transform) : props.transform);
320324
var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));
321325
var renderedIcon = fontawesomeSvgCore.icon(iconLookup, _objectSpread2({}, classes, {}, transform, {}, mask, {
322326
symbol: symbol,
323-
title: title
327+
title: title,
328+
titleId: titleId
324329
}));
325330

326331
if (!renderedIcon) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@fortawesome/react-fontawesome",
33
"description": "Official React component for Font Awesome 5",
4-
"version": "0.1.13",
4+
"version": "0.1.14",
55
"main": "index.js",
66
"module": "index.es.js",
77
"jsnext:main": "index.es.js",

0 commit comments

Comments
 (0)