rgossiaux / svelte-headlessui

Unofficial Svelte port of the Headless UI component library
https://svelte-headlessui.goss.io
MIT License
1.78k stars 96 forks source link

Typo in Tabs Component Page #160

Open nabriouso opened 1 year ago

nabriouso commented 1 year ago

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.