feathericons / feathericons/react-feather

Ref is working with icons, but is not present on Icon type

Open
#78 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
124
PR merge metrics
No merged PRs in 30d

Description

I'm moving a project to TypeScript and I can't use ref :)

The code:
```jsx

```
The compiler error:
```sh
Type error: Type '{ size: number; color: string; ref: MutableRefObject; }' is not assignable to type 'IntrinsicAttributes & Props & { children?: ReactNode; }'.
Property 'ref' does not exist on type 'IntrinsicAttributes & Props & { children?: ReactNode; }'. Did you mean 'href'?
```

Not sure what type to use for `forwardRef` function component, but seems like `FC` doesn't include any `ref` property 🤔

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.