To Reproduce
Copy and paste this snippet <Tab class={({selected}) => "tab-selected" : "tab-unselected"}>Tab 1</Tab> any IDE you use will return the following "Expected } svelte(unexpected-token)"
To Fix
Use this snippet instead <Tab class={({selected}) => selected ? "tab-selected" : "tab-unselected"}>Tab 1</Tab>
Library version
2.0
Credit where credit is due, I didn't find this issue until someone pointed it out to me in a Discord server but they didn't have the time to report it so here I am.
Describe the bug There is a typo in https://svelte-headlessui.goss.io/docs/2.0/tabs which renders the code broken
To Reproduce Copy and paste this snippet
<Tab class={({selected}) => "tab-selected" : "tab-unselected"}>Tab 1</Tab>
any IDE you use will return the following "Expected } svelte(unexpected-token)"To Fix Use this snippet instead
<Tab class={({selected}) => selected ? "tab-selected" : "tab-unselected"}>Tab 1</Tab>
Library version 2.0
Credit where credit is due, I didn't find this issue until someone pointed it out to me in a Discord server but they didn't have the time to report it so here I am.