new structure

This commit is contained in:
2026-03-20 01:11:32 +01:00
parent d24bad018e
commit 4b4eaa083b
76 changed files with 578 additions and 72 deletions

View File

@@ -0,0 +1,28 @@
import { $, html } from "sigpro";
$.component(
"c-radio",
(props, { emit }) => {
return html`
<label class="label cursor-pointer flex justify-start gap-4">
<input
type="radio"
.name=${() => props.name()}
.value=${() => props.value()}
.class=${() => `radio ${props.ui() ?? ""}`}
.disabled=${() => props.disabled()}
.checked=${() => props.checked()}
@change=${(e) => {
if (e.target.checked) emit("change", props.value());
}} />
${() =>
props.label()
? html`
<span class="label-text">${() => props.label()}</span>
`
: ""}
</label>
`;
},
["checked", "name", "label", "ui", "disabled", "value"],
);