Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fortawesome/react-fontawesome

Package Overview
Dependencies
Maintainers
6
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fortawesome/react-fontawesome - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4-1

13

index.d.ts
/// <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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc