svelteuidev / svelteui

SvelteUI Monorepo
https://svelteui.dev
MIT License
1.3k stars 62 forks source link

Wrong typings and class name in Burger component #330

Closed BeeMargarida closed 1 year ago

BeeMargarida commented 1 year ago

What package has an issue

@svelteuidev/core

A clear and concise description of what the bug is

Originated from https://discord.com/channels/954790377754337280/1082395387446427789/1082395387446427789

There are 3 problems related to the Burger component:

  1. Wrong typings - should extend UnstyledButton typings
  2. The root class name is not being applied
  3. "Element div not allowed as child of element button in this context" is showing as a warning since there's a div (non inline component) inside a button

In which browser(s) did the problem occur?

Firefox

Steps To Reproduce

Explained in the discord thread, for example with the code

<Button ripple compact variant="default" color="black" class="menu-button">
    <Burger root="div" opened={true} size="sm" />
    Menu
</Button>

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