konstaui / konsta

Mobile UI components made with Tailwind CSS
https://konstaui.com
MIT License
3.54k stars 131 forks source link

refs not part of the Typescript types #185

Open came opened 1 year ago

came commented 1 year ago

Check that this is really a bug

Reproduction link

https://stackblitz.com/edit/konsta-react-5jawzd?file=App.tsx

Bug description

Almost all konsta components forward refs and besides that even use useImperativeHandle 😍 However, when I add a ref prop to a component I get the TS error:

Property 'ref' does not exist on type 'IntrinsicAttributes & NotificationProps'.

Expected Behavior

I guess the refs need to be part of the build-react-types.js script

Actual Behavior

No response

Konsta UI version

3.1.1

Platform/Target and Browser Versions

macOS chrome

Validations

Would you like to open a PR for this bug?

samyarkd commented 3 days ago

it would be nice if this get fixed