import { $.component, html } from "sigpro"; $.component( "c-radio", (props, { emit }) => { return html` `radio ${props.cls() ?? ""}`} .disabled=${props.disabled} .checked=${props.checked} @change=${(e) => { if (e.target.checked) emit("change", props.value()); }} /> ${() => props.label() ? html` ${props.label} ` : ""} `; }, ["checked", "name", "label", "cls", "disabled", "value"], );