Add landing page for kjol, documentation
This commit is contained in:
@@ -57,11 +57,11 @@ import "kjol/vdom"
|
||||
// MenuDivider, MenuSection and MenuGroup stay free functions: they hold no state
|
||||
// and have nothing to close.
|
||||
|
||||
const menuCls = "bg-white rounded-default shadow-lg border border-neutral-200 p-1.5 min-w-48 max-h-96 overflow-y-auto"
|
||||
const menuItemCls = "flex items-center gap-2 w-full py-1.5 px-2 rounded-default text-sm text-left text-neutral-700 bg-transparent border-0 cursor-pointer hover:bg-neutral-100 hover:text-neutral-900 focus:bg-neutral-100 focus:outline-hidden disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
const menuDividerCls = "my-1 -mx-1.5 border-0 border-t border-neutral-200"
|
||||
const menuSectionCls = "pt-1.5 pb-0.5 px-2 text-[10px] font-semibold text-neutral-400 uppercase tracking-wide text-left"
|
||||
const menuSubmenuTriggerCls = "flex items-center justify-between gap-2 w-full py-1.5 px-2 rounded-default text-sm text-left text-neutral-700 cursor-pointer hover:bg-neutral-100 hover:text-neutral-900"
|
||||
const menuCls = "bg-surface rounded-default shadow-lg border border-line p-1.5 min-w-48 max-h-96 overflow-y-auto"
|
||||
const menuItemCls = "flex items-center gap-2 w-full py-1.5 px-2 rounded-default text-sm text-left text-ink-soft bg-transparent border-0 cursor-pointer hover:bg-surface-raised hover:text-ink focus:bg-surface-raised focus:outline-hidden disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
const menuDividerCls = "my-1 -mx-1.5 border-0 border-t border-line"
|
||||
const menuSectionCls = "pt-1.5 pb-0.5 px-2 text-[10px] font-semibold text-ink-faint uppercase tracking-wide text-left"
|
||||
const menuSubmenuTriggerCls = "flex items-center justify-between gap-2 w-full py-1.5 px-2 rounded-default text-sm text-left text-ink-soft cursor-pointer hover:bg-surface-raised hover:text-ink"
|
||||
|
||||
// defaultHoverCloseDelay is the TSX's 150ms grace period after the cursor leaves.
|
||||
const defaultHoverCloseDelay = 150
|
||||
@@ -375,7 +375,7 @@ func (m *Menu) Anchor(p MenuAnchorProps, children ...*vdom.VNode) *vdom.VNode {
|
||||
}
|
||||
mods = kids(mods, children)
|
||||
if target == "_blank" {
|
||||
mods = append(mods, Icon("arrow-right", 12, "shrink-0 ml-auto text-neutral-400"))
|
||||
mods = append(mods, Icon("arrow-right", 12, "shrink-0 ml-auto text-ink-faint"))
|
||||
}
|
||||
return vdom.A(mods...)
|
||||
}
|
||||
@@ -413,7 +413,7 @@ func (m *Menu) Submenu(p SubmenuProps, children ...*vdom.VNode) *vdom.VNode {
|
||||
OnClick: m.f.Toggle,
|
||||
},
|
||||
vdom.Span(label...),
|
||||
Icon("chevron-right", 16, "shrink-0 ml-auto text-neutral-400"),
|
||||
Icon("chevron-right", 16, "shrink-0 ml-auto text-ink-faint"),
|
||||
)
|
||||
menuSetAttr(trigger, "role", "menuitem")
|
||||
// Entering the trigger means entering the submenu; it must not let an ancestor
|
||||
|
||||
Reference in New Issue
Block a user