react-fontawesome icon indicating copy to clipboard operation
react-fontawesome copied to clipboard

TypeScript error when styling pro duotone icons

Open Jxyme opened this issue 3 years ago • 1 comments

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)

Jxyme avatar May 19 '22 09:05 Jxyme

+1 also getting this error

JshGrn avatar May 29 '23 15:05 JshGrn