Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript error when styling pro duotone icons #509

Open
Jxyme opened this issue May 19, 2022 · 1 comment
Open

TypeScript error when styling pro duotone icons #509

Jxyme opened this issue May 19, 2022 · 1 comment

Comments

@Jxyme
Copy link

Jxyme commented May 19, 2022

Describe the bug
When styling the pro duotone icons I receive a TypeScript error in the code editor (as shown below), even though the styles applied are displayed as expected when viewed in the browser. I have provided a basic test case below so you're able to reproduce the case for yourselves.

NxWDYECB

Reproducible test case

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faEclipse } from '@fortawesome/pro-duotone-svg-icons'

export default function Example() {
  return (
    <FontAwesomeIcon
      icon={faEclipse}
      style={{
        '--fa-primary-color': '#FFFFFF',
        '--fa-primary-opacity': '1.0',
        '--fa-secondary-color': '#000000',
        '--fa-secondary-opacity': '1.0',
      }}
    />
  )
}
{
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/pro-duotone-svg-icons": "^6.1.1",
    "@fortawesome/react-fontawesome": "^0.1.18",
  },
}

Expected behavior
There shouldn't be any TypeScript error when applying the individual colour styles for the pro duotone icons.

Desktop (please complete the following information):

  • Browser: Safari
  • Version: 15.4 (17613.1.17.1.13)
@JshGrn
Copy link

JshGrn commented May 29, 2023

+1 also getting this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants