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

TS2322: Type "fa-regular fa-whale" is not assignable to type IconProp #572

Open
billsbooth opened this issue Jan 15, 2025 · 0 comments
Open

Comments

@billsbooth
Copy link

billsbooth commented Jan 15, 2025

Describe the bug
Getting a TS Syntax error when using a string name in icon for regular style in React Native + Expo.

Reproducible test case

import { faWhale } from '@fortawesome/pro-regular-svg-icons/faWhale';
library.add(faWhale);

// TS2322: Type "fa-regular fa-whale" is not assignable to type IconProp
// index.d.ts(9, 3): The expected type comes from property icon which is declared here on type IntrinsicAttributes & Props
<FontAwesomeIcon  icon={'fa-regular fa-whale'} />

Expected behavior
Following the guidelines here, this should technically work.

Running RN on Expo:

"react": "18.3.1",
"react-native": "0.76.3",
"expo": "^52.0.11",
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

1 participant