Skip to content

Commit

Permalink
Duotone icon support (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
robmadole authored Sep 29, 2019
1 parent 207013b commit 358b4d0
Show file tree
Hide file tree
Showing 14 changed files with 9,611 additions and 11,228 deletions.
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 10.16.0
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ If you are a [Font Awesome Pro](https://fontawesome.com/pro) subscriber you can
$ npm i --save @fortawesome/pro-solid-svg-icons
$ npm i --save @fortawesome/pro-regular-svg-icons
$ npm i --save @fortawesome/pro-light-svg-icons
$ npm i --save @fortawesome/pro-duotone-svg-icons
```
**Duotone icons are currently in pre-release and are coming soon to this component.**

## Usage

Expand Down Expand Up @@ -425,6 +425,13 @@ Spin and pulse [animation](https://fontawesome.com/how-to-use/on-the-web/styling
<FontAwesomeIcon icon="spinner" pull="right" />
```

[Swap opacity](https://fontawesome.com/how-to-use/on-the-web/styling/duotone-icons) (duotone icons only):

```javascript
<FontAwesomeIcon icon={['fad', 'stroopwafel']} />
<FontAwesomeIcon icon={['fad', 'stroopwafel']} swapOpacity />
```

Your own class names:

```javascript
Expand Down
7 changes: 4 additions & 3 deletions examples/create-react-app-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
"@fortawesome/fontawesome-svg-core": "^1.2.10",
"@fortawesome/free-brands-svg-icons": "^5.6.1",
"@fortawesome/free-solid-svg-icons": "^5.6.1",
"@fortawesome/pro-duotone-svg-icons": "^5.10.2",
"@fortawesome/react-fontawesome": "^0.1.3",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-scripts": "2.1.1",
"react-scripts": "3.0.1",
"typescript": "^3.2.2"
},
"devDependencies": {
"@types/jest": "^21.1.9",
"@types/node": "^8.10.38",
"@types/jest": "^24.0.16",
"@types/node": "^12.6.8",
"@types/prop-types": "^15.5.8",
"@types/react": "^16.7.17",
"@types/react-dom": "^16.0.11"
Expand Down
5 changes: 5 additions & 0 deletions examples/create-react-app-typescript/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { fab } from '@fortawesome/free-brands-svg-icons'
import { fad } from '@fortawesome/pro-duotone-svg-icons'
import {
faCoffee,
faCog,
Expand All @@ -20,6 +21,7 @@ import {

library.add(
fab,
fad,
faCoffee,
faCog,
faSpinner,
Expand Down Expand Up @@ -53,6 +55,9 @@ export class App extends React.Component {
<li className="pv3 ph2 ma0 link grow">
<FontAwesomeIcon icon={coffeeIconDefinition} size="4x" />
</li>
<li className="pv3 ph2 ma0 link grow">
<FontAwesomeIcon icon={['fad', 'stroopwafel']} size="4x" />
</li>
<li className="pv3 ph2 ma0 link grow">
<FontAwesomeIcon
icon={['fas', 'cog']}
Expand Down
3 changes: 2 additions & 1 deletion examples/create-react-app-typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve"
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "esnext"]
},
"include": ["src"]
}
Loading

0 comments on commit 358b4d0

Please sign in to comment.