UUUUPPPPP work

This commit is contained in:
2026-03-25 02:03:59 +01:00
parent c857900860
commit df8bd891a2
32 changed files with 1126 additions and 233 deletions

28
components_/Radio.js Normal file
View File

@@ -0,0 +1,28 @@
import { $.component, 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.cls() ?? ""}`}
.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", "cls", "disabled", "value"],
);