actionbutton

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 3 Imported by: 0

README

ActionButton

Versatile button component with variant support.

Import

"github.com/tinywasm/components/actionbutton"

Usage

import "github.com/tinywasm/components/actionbutton"

btn := &actionbutton.ActionButton{
    Text: "Save Changes",
    Variant: "primary",
    OnClick: func(e dom.Event) {
        fmt.Println("Saved!")
    },
}

Properties

  • Text (string): The button label.
  • Variant (string): Visual style (primary, secondary, danger).
  • OnClick (func(dom.Event)): Click handler.

Back to Catalog

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionButton

type ActionButton struct {
	Element
	Text    string
	Variant string // "primary", "secondary", "danger"
	OnClick func(Event)
}

func (*ActionButton) Render

func (b *ActionButton) Render() *Element

func (*ActionButton) RenderCSS

func (b *ActionButton) RenderCSS() *Stylesheet

Jump to

Keyboard shortcuts

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