svelteuidev / svelteui

SvelteUI Monorepo
https://svelteui.dev
MIT License
1.28k stars 64 forks source link

`iconProps` is spread too early in Menu.Item #373

Closed longnguyen2004 closed 1 year ago

longnguyen2004 commented 1 year ago

What package has an issue

@svelteuidev/core

A clear and concise description of what the bug is

https://github.com/svelteuidev/svelteui/blob/83b3fb34a1445fa3a4ca6f06601c036d4c2d6320/packages/svelteui-core/src/components/Menu/MenuItem/MenuItem.svelte#L55-L57

iconProps is spread by IconRenderer itself, so spreading it here is too early, and breaks the feature altogether.

In which browser(s) did the problem occur?

No response

Steps To Reproduce

Use an icon component that requires passing in extra props (for example: svelte-fa), observes that the props are spread before it reaches IconRenderer

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Relevant Assets

No response