Skip to content

Commit

Permalink
Merge pull request #66 from gthomas-appfolio/fixIconFixedWidth
Browse files Browse the repository at this point in the history
Rename icon-fixed-width to icon-fw
  • Loading branch information
Aaron Panchal authored Nov 30, 2016
2 parents 8f42504 + dfd6cc9 commit 66a33a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/FontAwesome3.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default React.createClass({
spin && classNames.push(cssModule[prefix + '-spin'])
pulse && classNames.push(cssModule[prefix + '-pulse'])
border && classNames.push(cssModule[prefix + '-border'])
fixedWidth && classNames.push(cssModule[prefix + '-fixed-width'])
fixedWidth && classNames.push(cssModule[prefix + '-fw'])
flip && classNames.push(cssModule[prefix + '-flip-' + flip])
rotate && classNames.push(cssModule[prefix + '-rotate-' + rotate])
stack && classNames.push(cssModule[prefix + '-stack-' + stack])
Expand All @@ -99,7 +99,7 @@ export default React.createClass({
spin && classNames.push(prefix + '-spin')
pulse && classNames.push(prefix + '-pulse')
border && classNames.push(prefix + '-border')
fixedWidth && classNames.push(prefix + '-fixed-width')
fixedWidth && classNames.push(prefix + '-fw')
flip && classNames.push(prefix + '-flip-' + flip)
rotate && classNames.push(prefix + '-rotate-' + rotate)
stack && classNames.push(prefix + '-stack-' + stack)
Expand Down
7 changes: 3 additions & 4 deletions src/components/Icon.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React from 'react';
import FontAwesome from 'react-fontawesome';
import FontAwesome3 from './FontAwesome3.js';
import omit from 'lodash.omit';

const Icon = (props) => {
const newProps = omit(props, 'v');
return props.v === 3 ? <FontAwesome3 {...newProps} /> : <FontAwesome {...newProps} />;
const Icon = props => {
const { v, ...newProps } = props;
return v === 3 ? <FontAwesome3 {...newProps} /> : <FontAwesome {...newProps} />;
};

Icon.displayName = 'Icon';
Expand Down

0 comments on commit 66a33a8

Please sign in to comment.