Documentation
¶
Index ¶
Constants ¶
View Source
const NameThemeToggle = widget.Name("themetoggle")
NameThemeToggle is the widget name.
View Source
const (
PartButton = widget.Part("button")
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThemeToggle ¶
type ThemeToggle struct {
Element
// contains filtered or unexported fields
}
ThemeToggle es un botón flotante que alterna entre dark y light. Restaura automáticamente el tema guardado en localStorage al montarse.
func (*ThemeToggle) Init ¶ added in v0.1.7
func (t *ThemeToggle) Init(_ Ctx)
func (*ThemeToggle) Render ¶
func (t *ThemeToggle) Render() *Element
func (*ThemeToggle) RenderCSS ¶
func (t *ThemeToggle) RenderCSS() *css.Stylesheet
RenderCSS defines the themetoggle visual contract using style DSL. It is a "Fixed floating button" (see README) — Docked(Viewport, ...) is what makes that true; a consumer must not have to reposition it itself with inline CSS, that would be exactly the hardcoded-style workaround the harness forbids.
func (*ThemeToggle) WidgetKind ¶ added in v0.1.13
func (t *ThemeToggle) WidgetKind() widget.Kind
func (*ThemeToggle) WidgetName ¶ added in v0.1.13
func (t *ThemeToggle) WidgetName() widget.Name
Click to show internal directories.
Click to hide internal directories.