@fortawesome/react-fontawesome
Advanced tools
Comparing version 0.1.3 to 0.1.4-1
/// <reference types="react" /> | ||
import { CSSProperties } from 'react' | ||
import React from 'react' | ||
import { | ||
@@ -13,5 +14,3 @@ Transform, | ||
export function FontAwesomeIcon(props: Props): JSX.Element | ||
export interface Props { | ||
export interface Props extends React.DOMAttributes<any> { | ||
icon: IconProp | ||
@@ -33,5 +32,5 @@ mask?: IconProp | ||
symbol?: FaSymbol | ||
style?: CSSProperties | ||
tabIndex?: number; | ||
title?: string; | ||
style?: React.CSSProperties | ||
} | ||
export function FontAwesomeIcon(props: Props): JSX.Element |
{ | ||
"name": "@fortawesome/react-fontawesome", | ||
"description": "Official React component for Font Awesome 5", | ||
"version": "0.1.3", | ||
"version": "0.1.4-1", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "module": "index.es.js", |
@@ -30,2 +30,5 @@ <a href="https://fontawesome.com"> | ||
* [TypeScript](#typescript) | ||
- [Frequent questions](#frequent-questions) | ||
* [How do I import the same icon from two different styles?](#how-do-i-import-the-same-icon-from-two-different-styles) | ||
* [I don't think tree-shaking is working; got any advice?](#i-dont-think-tree-shaking-is-working-got-any-advice) | ||
- [How to Help](#how-to-help) | ||
@@ -521,2 +524,20 @@ - [Contributors](#contributors) | ||
## Frequent questions | ||
### How do I import the same icon from two different styles? | ||
With ES modules and `import` statements we can rename: | ||
```javascript | ||
import { library } from '@fortawesome/fontawesome-svg-core' | ||
import { faStroopwafel as fasFaStroopwafel } from '@fortawesome/pro-solid-svg-icons' | ||
import { faStroopwafel as farFaStroopwafel } from '@fortawesome/pro-regular-svg-icons' | ||
library.add(fasFaStroopwafel, farFaStroopwafel) | ||
``` | ||
### I don't think tree-shaking is working; got any advice? | ||
Check out our [docs here](https://fontawesome.com/how-to-use/with-the-api/other/tree-shaking). | ||
## How to Help | ||
@@ -523,0 +544,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50378
580
683