nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.15k stars 553 forks source link

`UButton` emits #2103

Open ElYaiko opened 3 months ago

ElYaiko commented 3 months ago

Environment

Version

v2.18.4

Reproduction

-

Description

Type '{ class: string; label: string; onClick: () => void; }' is not assignable to type 'IntrinsicAttributes & Partial<{ size: ButtonSize; type: string; replace: boolean; class: any; truncate: boolean; target: "_blank" | "_parent" | "_self" | "_top" | (string & {}); ... 25 more ...; trailing: boolean; }> & Omit<...>'.
  Property 'onClick' does not exist on type 'IntrinsicAttributes & Partial<{ size: ButtonSize; type: string; replace: boolean; class: any; truncate: boolean; target: "_blank" | "_parent" | "_self" | "_top" | (string & {}); ... 25 more ...; trailing: boolean; }> & Omit<...>'.

Additional context

Emits like @click are not defined in the UButton component.

Logs

No response

ElYaiko commented 1 month ago

Any update? More than the half of tsc errors in my project are because of this

sandros94 commented 2 weeks ago

I'm sorry taking so long to get back to you @ElYaiko 🙏

Would you be able to set up a stackblitz reproduction?

ElYaiko commented 2 weeks ago

I'm sorry taking so long to get back to you @ElYaiko 🙏

Would you be able to set up a stackblitz reproduction?

https://stackblitz.com/edit/github-vgvpdj?file=app.tsx