Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Theme ¶
type Theme string
Theme representa el estado de tema del componente. ThemeAuto ("") = sin atributo data-theme → OS preference via @media. Los valores "dark" y "light" se escriben literalmente en data-theme.
type ThemeToggle ¶
type ThemeToggle struct {
Element
}
ThemeToggle es un botón flotante que cicla entre los 3 modos de tema. Restaura automáticamente el tema guardado en localStorage al montarse.
ts := &themetoggle.ThemeToggle{}
Append("body", ts)
func (*ThemeToggle) IconSvg ¶
func (t *ThemeToggle) IconSvg() map[string]string
func (*ThemeToggle) OnMount ¶
func (t *ThemeToggle) OnMount()
En SSR no hay localStorage ni clicks. Stubs no-op para compilación correcta.
func (*ThemeToggle) Render ¶
func (t *ThemeToggle) Render() *Element
func (*ThemeToggle) RenderCSS ¶
func (t *ThemeToggle) RenderCSS() *Stylesheet
Click to show internal directories.
Click to hide internal directories.