Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings with FontAwesome5 for web #825

Merged
merged 2 commits into from
Aug 30, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Updating propTypes for FA5
Extra fix, never edit code on github.com
  • Loading branch information
hampustagerud authored and soranoba committed Aug 29, 2018
commit a65e0de438cdcd4f1e1499fd3c0f82073c6777df
11 changes: 7 additions & 4 deletions lib/create-icon-set-from-fontawesome5.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,13 @@ export function createFA5iconSet(glyphMap, metadata = {}, proVersion = false) {

function createFA5iconClass(baseClass, selectClass = iconSet => iconSet) {
class FA5iconClass extends PureComponent {
static propTypes = Object.create(baseClass.propTypes, {
light: PropTypes.bool,
solid: PropTypes.bool,
});
static propTypes = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this and now both npm and yarn tests passes, please try 🙂

baseClass.propTypes,
{
light: PropTypes.bool,
solid: PropTypes.bool,
},
];

static defaultProps = {
light: false,
Expand Down