Add landing page for kjol, documentation
This commit is contained in:
@@ -14,7 +14,7 @@ func ToggleSwitch(checked bool, onChange func(bool), label, description string,
|
||||
onChange(!checked)
|
||||
}
|
||||
|
||||
trackState := "bg-neutral-300"
|
||||
trackState := "bg-surface-strong"
|
||||
if checked {
|
||||
trackState = "bg-primary"
|
||||
}
|
||||
@@ -24,7 +24,7 @@ func ToggleSwitch(checked bool, onChange func(bool), label, description string,
|
||||
if checked {
|
||||
knobState = "translate-x-[18px]"
|
||||
}
|
||||
knobCls := cx("inline-block h-4 w-4 transform rounded-full bg-white shadow-sm transition-transform", knobState)
|
||||
knobCls := cx("inline-block h-4 w-4 transform rounded-full bg-surface shadow-sm transition-transform", knobState)
|
||||
|
||||
ariaChecked := "false"
|
||||
if checked {
|
||||
@@ -47,16 +47,16 @@ func ToggleSwitch(checked bool, onChange func(bool), label, description string,
|
||||
if label != "" || description != "" {
|
||||
text := []vdom.Mod{vdom.Attr("class", "flex flex-col leading-tight")}
|
||||
if label != "" {
|
||||
labelColor := "text-neutral-800"
|
||||
labelColor := "text-ink"
|
||||
if disabled {
|
||||
labelColor = "text-neutral-400"
|
||||
labelColor = "text-ink-faint"
|
||||
}
|
||||
text = append(text, vdom.Span(vdom.Attr("class", cx("text-sm select-none", labelColor)),
|
||||
vdom.On(vdom.EVENT_CLICK, toggle),
|
||||
vdom.Text(label)))
|
||||
}
|
||||
if description != "" {
|
||||
text = append(text, vdom.Span(vdom.Attr("class", "text-xs text-neutral-500"), vdom.Text(description)))
|
||||
text = append(text, vdom.Span(vdom.Attr("class", "text-xs text-ink-muted"), vdom.Text(description)))
|
||||
}
|
||||
mods = append(mods, vdom.Div(text...))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user