diff --git a/.zed/settings.json b/.zed/settings.json new file mode 100644 index 0000000..4980a77 --- /dev/null +++ b/.zed/settings.json @@ -0,0 +1,9 @@ +{ + "lsp": { + "tailwindcss-language-server": { + "settings": { + "classFunctions": ["tw"] + } + } + } +} diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte index b0eda4c..98c016c 100644 --- a/src/lib/components/Button.svelte +++ b/src/lib/components/Button.svelte @@ -1,45 +1,40 @@ - +{#snippet content()} {#if variant === 'primary'}
{@render children?.()}
{:else} {@render children?.()} {/if} -
+{/snippet} + +{#if 'href' in rest} + {@render content()} +{:else} + +{/if} diff --git a/src/lib/components/GroupedList/GroupedListItem.svelte b/src/lib/components/GroupedList/GroupedListItem.svelte index 6f41873..f149a9a 100644 --- a/src/lib/components/GroupedList/GroupedListItem.svelte +++ b/src/lib/components/GroupedList/GroupedListItem.svelte @@ -1,29 +1,37 @@ - +{#snippet content()} {#if icon} {@render children?.()} - +{/snippet} + +{#if 'href' in rest} + {@render content()} +{:else if 'onclick' in rest} + +{:else} +
{@render content()}
+{/if}