Migrate from DaisyUI to SkeletonUI

This commit is contained in:
2024-12-12 23:29:24 +01:00
parent 2f934537a2
commit 8060c4971d
15 changed files with 396 additions and 414 deletions

View File

@ -1,20 +1,24 @@
<script lang="ts">
let {
id = "",
name = "",
formaction = "",
label,
children,
color,
disabled = false,
submit = false,
href = undefined,
fullwidth = false,
...restProps
} = $props();
</script>
<!-- HACK: Set --tw-bg-opacity to 1 so the disabled label/button looks like the disabled input -->
<button
{id}
{name}
{formaction}
{disabled}
class="btn btn-{color}"
style="--tw-bg-opacity: 1">{label}</button
>
{#if href}
<a {href} class="btn p-2 variant-filled-{color} {fullwidth ? 'w-full' : 'w-auto'}" {...restProps}>
{@render children()}
</a>
{:else}
<button
type={submit ? "submit" : "button"}
class="btn p-2 variant-filled-{color} {fullwidth ? 'w-full' : 'w-auto'}"
{...restProps}
>
{@render children()}
</button>
{/if}