release: WRNexusJS 0.2.48
This commit is contained in:
@@ -1,15 +1 @@
|
||||
// Radio input with an inline label.
|
||||
component Radio {
|
||||
props {
|
||||
name = ""
|
||||
value = ""
|
||||
label = ""
|
||||
class = ""
|
||||
}
|
||||
view {
|
||||
<label class="wire-check {class}">
|
||||
<input type="radio" name="{name}" value="{value}" class="wire-check__box">
|
||||
<span class="wire-check__label"><slot>{label}</slot></span>
|
||||
</label>
|
||||
}
|
||||
}
|
||||
component Radio { props { id = "" name = "choice" value = "" label = "Option" description = "" checked = false disabled = false } view { <label for="{id}" class="flex min-h-11 cursor-pointer items-start gap-3 rounded-xl border border-slate-200 p-3 transition hover:border-violet-400 dark:border-slate-800"><input id="{id}" name="{name}" type="radio" value="{value}" checked="{checked}" disabled="{disabled}" class="mt-0.5 size-5 border-slate-300 text-violet-600 focus:ring-violet-500" /><span><span class="block text-sm font-semibold">{label}</span><span data-show="description" class="text-sm text-slate-500">{description}</span></span></label> } }
|
||||
|
||||
Reference in New Issue
Block a user