Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Popup ¶
func Popup( content api.Composable, options ...PopupOption, ) api.Composable
Popup shows content overlaid on top of other content. It uses op.Defer to effectively "break out" of the z-order (though it respects parent clipping). The content is laid out with loose constraints (0 to Max).
Types ¶
type PopupAlignment ¶
type PopupAlignment int
PopupAlignment determines how the popup is aligned relative to its anchor point. For now, we assume the anchor point is the top-left of where this Popup is called.
const (
AlignTopLeft PopupAlignment = iota
)
type PopupOption ¶
type PopupOption func(*PopupOptions)
func WithAlignment ¶
func WithAlignment(alignment PopupAlignment) PopupOption
func WithOffset ¶
func WithOffset(x, y unit.Dp) PopupOption
func WithOnDismissRequest ¶ added in v0.1.60
func WithOnDismissRequest(onDismiss func()) PopupOption
type PopupOptions ¶
type PopupOptions struct {
Alignment PopupAlignment
OffsetX unit.Dp
OffsetY unit.Dp
OnDismissRequest func() // Called when clicking outside the popup content
}
func DefaultPopupOptions ¶
func DefaultPopupOptions() PopupOptions
Click to show internal directories.
Click to hide internal directories.