Lib: Add button

This commit is contained in:
2024-12-12 04:36:54 +01:00
parent 5b3be949fe
commit 0e57957610

View File

@ -0,0 +1,20 @@
<script lang="ts">
let {
id = "",
name = "",
formaction = "",
label,
color,
disabled = false,
} = $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
>