component

package
v0.0.0-...-6902453 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OverlayContext = contextutil.New[OverlayState](contextutil.Defaulter(func() OverlayState {
	return &overlayState{}
}))

Functions

func Positioned

func Positioned(contents VNode, modifiers ...modifierapi.Modifier[any]) interface {
	modifierapi.Modifier[any]
	ComponentWrapper
}

func RootPortal

func RootPortal(modifiers ...modifierapi.Modifier[any]) VNode

Types

type Overlay

type Overlay struct {
	Visible         bool
	OnVisibleChange func(v bool)
	Refs            []*Ref[Element]
}

func (Overlay) Build

func (o Overlay) Build(c BuildContext) VNode

type OverlayStack

type OverlayStack interface {
	Add(o OverlayState)
	Remove(o OverlayState)
}

type OverlayState

type OverlayState interface {
	OverlayStack
	Visible() bool
	ElementRefs() []*Ref[Element]

	Topmost() bool

	IsClickInside(pt unit.Point) bool
}

Directories

Path Synopsis
m3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL