Add landing page for kjol, documentation
This commit is contained in:
@@ -403,6 +403,13 @@ type FloatingTriggerProps struct {
|
||||
// OnClick runs in addition to the toggle (which is suppressed when the trigger
|
||||
// opens on hover).
|
||||
OnClick func()
|
||||
|
||||
// NoToggle anchors the panel to this element without making it a switch.
|
||||
//
|
||||
// A text field is not a switch: the panel opens because you typed, and closes
|
||||
// because you chose something. Toggling on click means clicking back into the field
|
||||
// to fix a typo dismisses the results you were reading.
|
||||
NoToggle bool
|
||||
}
|
||||
|
||||
// Trigger renders the element the panel is anchored to.
|
||||
@@ -436,6 +443,10 @@ func (f *Floating) Trigger(p FloatingTriggerProps, children ...*vdom.VNode) *vdo
|
||||
if p.OnClick != nil {
|
||||
mods = append(mods, vdom.On(vdom.EVENT_CLICK, p.OnClick))
|
||||
}
|
||||
} else if p.NoToggle {
|
||||
if p.OnClick != nil {
|
||||
mods = append(mods, vdom.On(vdom.EVENT_CLICK, p.OnClick))
|
||||
}
|
||||
} else {
|
||||
mods = append(mods, vdom.On(vdom.EVENT_CLICK, func() {
|
||||
if p.OnClick != nil {
|
||||
|
||||
Reference in New Issue
Block a user