-
In the readme you write:
And I'm wondering, why though? It's 100% possible to do it the same way as the React version. See here: And I think it would be nicer to namespace the components like that, because then your import statements can be a lot shorter. import { Menu, MenuButton, MenuItems, MenuItem, Listbox, ListboxButton, ListboxOptions } from '@rgossiaux/svelte-headlessui' Could then just be import { Menu, Listbox } from '@rgossiaux/svelte-headlessui' |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The React version uses dots, the Vue version does not. I went with the Vue naming as it felt closer more "Svelte-y" to me. I don't think optimizing for the number of characters in your import statement is an important consideration. |
Beta Was this translation helpful? Give feedback.
-
Transition enterFrom, enterTo and leaveFrom do not feel Svelty either, they're not weby. They should have had kabob-case. It says in the documentation: SVG attributes in React like strokeWidth, strokeLinecap, etc. become stroke-width, stroke-linecap, etc. in Svelte. https://svelte-headlessui.goss.io/docs/tailwind-ui#jsx-camelcased-attribute-names |
Beta Was this translation helpful? Give feedback.
The React version uses dots, the Vue version does not. I went with the Vue naming as it felt closer more "Svelte-y" to me. I don't think optimizing for the number of characters in your import statement is an important consideration.