-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support some new Font Awesome 6 feature (#398)
- Loading branch information
1 parent
11ebdc6
commit eddb45b
Showing
9 changed files
with
126 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@fortawesome:registry=https://npm.fontawesome.com/ | ||
//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
nodejs 10.16.0 | ||
nodejs 10.16.2 | ||
python 3.7.5 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react' | ||
import FontAwesomeIcon from '../FontAwesomeIcon' | ||
import renderer from 'react-test-renderer' | ||
import { parse } from '@fortawesome/fontawesome-svg-core' | ||
|
||
export const REFERENCE_ICON_BY_STYLE = 0x00 | ||
export const ICON_ALIASES = 0x01 | ||
|
||
export function coreHasFeature (feature) { | ||
if (feature === REFERENCE_ICON_BY_STYLE || feature === ICON_ALIASES) { | ||
return parse.icon | ||
} | ||
} | ||
|
||
export function mount(props = {}, { createNodeMock } = {}) { | ||
const component = renderer.create(<FontAwesomeIcon {...props} />, { | ||
createNodeMock | ||
}) | ||
|
||
return component.toJSON() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export const faCoffee = { | ||
prefix: 'fas', | ||
iconName: 'coffee', | ||
icon: [ | ||
640, | ||
512, | ||
[], | ||
'f0f4', | ||
'M192 384h192c53 0 96-43 96-96h32c70.6 0 128-57.4 128-128S582.6 32 512 32H120c-13.3 0-24 10.7-24 24v232c0 53 43 96 96 96zM512 96c35.3 0 64 28.7 64 64s-28.7 64-64 64h-32V96h32zm47.7 384H48.3c-47.6 0-61-64-36-64h583.3c25 0 11.8 64-35.9 64z' | ||
] | ||
} | ||
|
||
export const faCircle = { | ||
prefix: 'fas', | ||
iconName: 'circle', | ||
icon: [ | ||
640, | ||
512, | ||
[], | ||
'f0f4', | ||
'M192 384h192c53 0 96-43 96-96h32c70.6 0 128-57.4 128-128S582.6 32 512 32H120c-13.3 0-24 10.7-24 24v232c0 53 43 96 96 96zM512 96c35.3 0 64 28.7 64 64s-28.7 64-64 64h-32V96h32zm47.7 384H48.3c-47.6 0-61-64-36-64h583.3c25 0 11.8 64-35.9 64z' | ||
] | ||
} | ||
|
||
export const faSpartan = { | ||
prefix: 'fat', | ||
iconName: 'spartan', | ||
icon: [ | ||
640, | ||
512, | ||
[], | ||
'f0f4', | ||
'M192 384h192c53 0 96-43 96-96h32c70.6 0 128-57.4 128-128S582.6 32 512 32H120c-13.3 0-24 10.7-24 24v232c0 53 43 96 96 96zM512 96c35.3 0 64 28.7 64 64s-28.7 64-64 64h-32V96h32zm47.7 384H48.3c-47.6 0-61-64-36-64h583.3c25 0 11.8 64-35.9 64z' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters