Skip to content

Commit

Permalink
Release 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
robmadole committed Sep 6, 2018
1 parent 5d7af38 commit b5a2e50
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

---

## [0.1.3](https://github.com/FortAwesome/react-fontawesome/releases/tag/0.1.3) - 2018-09-06

### Added

- Add title prop #180

---

## [0.1.2](https://github.com/FortAwesome/react-fontawesome/releases/tag/0.1.2) - 2018-08-12

### Changed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ being awesome contributors to this project. **We'd like to take a moment to reco
| <img src="https://github.com/kirkbross.png?size=72" /> | Kirk Ross | [@kirkbross](https://github.com/kirkbross) |
| | Prateek Goel | [@prateekgoel](https://github.com/prateekgoel) |
| <img src="https://github.com/naortor.png?size=72" /> | Naor Torgeman | [@naortor](https://github.com/naortor) |
| <img src="https://github.com/mmhand123.png?size=72" /> | Matthew Hand | [@mmhand123](https://github.com/mmhand123) |
If we've missed someone (which is quite likely) submit a Pull Request to us and we'll get it resolved.
Expand Down
12 changes: 10 additions & 2 deletions index.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ function styleToObject(style) {
function convert(createElement, element) {
var extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

if (typeof element === 'string') {
return element;
}
var children = (element.children || []).map(convert.bind(null, createElement));

var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) {
Expand Down Expand Up @@ -315,7 +318,8 @@ function FontAwesomeIcon(props) {
var iconArgs = props.icon,
maskArgs = props.mask,
symbol = props.symbol,
className = props.className;
className = props.className,
title = props.title;


var iconLookup = normalizeIconArgs(iconArgs);
Expand All @@ -324,7 +328,8 @@ function FontAwesomeIcon(props) {
var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));

var renderedIcon = icon(iconLookup, _extends({}, classes, transform, mask, {
symbol: symbol
symbol: symbol,
title: title
}));

if (!renderedIcon) {
Expand Down Expand Up @@ -376,6 +381,8 @@ FontAwesomeIcon.propTypes = {

symbol: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),

title: PropTypes.string,

transform: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
};

Expand All @@ -394,6 +401,7 @@ FontAwesomeIcon.defaultProps = {
size: null,
spin: false,
symbol: false,
title: '',
transform: null
};

Expand Down
12 changes: 10 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
function convert(createElement, element) {
var extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

if (typeof element === 'string') {
return element;
}
var children = (element.children || []).map(convert.bind(null, createElement));

var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) {
Expand Down Expand Up @@ -320,7 +323,8 @@
var iconArgs = props.icon,
maskArgs = props.mask,
symbol = props.symbol,
className = props.className;
className = props.className,
title = props.title;


var iconLookup = normalizeIconArgs(iconArgs);
Expand All @@ -329,7 +333,8 @@
var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));

var renderedIcon = fontawesomeSvgCore.icon(iconLookup, _extends({}, classes, transform, mask, {
symbol: symbol
symbol: symbol,
title: title
}));

if (!renderedIcon) {
Expand Down Expand Up @@ -381,6 +386,8 @@

symbol: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),

title: PropTypes.string,

transform: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
};

Expand All @@ -399,6 +406,7 @@
size: null,
spin: false,
symbol: false,
title: '',
transform: null
};

Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fortawesome/react-fontawesome",
"description": "Official React component for Font Awesome 5",
"version": "0.1.2",
"version": "0.1.3",
"main": "index.js",
"module": "index.es.js",
"jsnext:main": "index.es.js",
Expand All @@ -14,7 +14,12 @@
"contributors": [
"Travis Chase <travis@fontawesome.com>",
"Rob Madole <rob@fontawesome.com>",
"Mike Wilkerson <mwilkerson@gmail.com>"
"Mike Wilkerson <mwilkerson@gmail.com>",
"Nate Radebaugh <github.com/NateRadebaugh>",
"Kirk Ross <github.com/kirkbross>",
"Prateek Goel <github.com/prateekgoel>",
"Naor Torgeman <github.com/naortor>",
"Matthew Hand <github.com/mmhand123>"
],
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit b5a2e50

Please sign in to comment.