Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ButtonFixtures = gx.Fixtures[ButtonProps]{ "Default": {Children: gx.Text("Button")}, "Secondary": {Variant: Secondary, Children: gx.Text("Secondary")}, "Destructive": {Variant: Destructive, Children: gx.Text("Delete")}, "Outline": {Variant: Outline, Children: gx.Text("Outline")}, "Ghost": {Variant: Ghost, Children: gx.Text("Ghost")}, "Link": {Variant: Link, Children: gx.Text("Link")}, "ExtraSmall": {Size: Xs, Children: gx.Text("Extra small")}, "Small": {Size: Sm, Children: gx.Text("Small")}, "Large": {Size: Lg, Children: gx.Text("Large")}, "WithIcon": {Variant: Outline, Children: gx.Frag(gx.Text("Next"), icons.ChevronRight(icons.ChevronRightProps{}))}, "Icon": {Variant: Outline, Size: Icon, Attrs: iconLabel, Children: icons.ChevronRight(icons.ChevronRightProps{})}, "IconXs": {Variant: Outline, Size: IconXs, Attrs: iconLabel, Children: icons.ChevronRight(icons.ChevronRightProps{})}, "IconSm": {Variant: Outline, Size: IconSm, Attrs: iconLabel, Children: icons.ChevronRight(icons.ChevronRightProps{})}, "IconLg": {Variant: Outline, Size: IconLg, Attrs: iconLabel, Children: icons.ChevronRight(icons.ChevronRightProps{})}, "Disabled": {Attrs: gx.Attrs{gx.Bool("disabled", true)}, Children: gx.Text("Disabled")}, }
Functions ¶
func Button ¶
func Button(p ButtonProps) gx.Node
Types ¶
type ButtonProps ¶
type ButtonProps struct {
// Variant sets the visual style: Default, Secondary, Destructive, Outline, Ghost or Link.
Variant Variant
// Size sets the height and padding: Xs, Sm, Md, Lg, or an Icon size for a square button.
Size Size
// Type is the type attribute: "button", "submit" or "reset".
Type string
// Class adds classes to the root element.
Class string
// Children is the button label.
Children gx.Node
// Attrs adds HTML attributes to the root element.
Attrs gx.Attrs
}
Click to show internal directories.
Click to hide internal directories.