buttons

package
v0.0.0-...-253b25b Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

templ: version: v0.2.747

Index

Constants

View Source
const RootClassName = "btn"

Variables

This section is empty.

Functions

func Show

func Show(props ButtonProps) templ.Component

Types

type ButtonClassType

type ButtonClassType string
const DangerButton ButtonClassType = "btn-danger"
const DarkButton ButtonClassType = "btn-dark"
const InfoButton ButtonClassType = "btn-info"
const LightButton ButtonClassType = "btn-light"
const PrimaryButton ButtonClassType = "btn-primary"
const SecondaryButton ButtonClassType = "btn-secondary"
const SuccessButton ButtonClassType = "btn-success"
const WarningButton ButtonClassType = "btn-warning"

type ButtonElementType

type ButtonElementType string
const AnchorButtonType ButtonElementType = "a"
const ButtonButtonType ButtonElementType = "button"
const InputButtonType ButtonElementType = "input"

type ButtonProps

type ButtonProps struct {
	base.ElementProps
	IsDisabled        bool
	ButtonType        ButtonType
	AnchorTypeLink    string
	ButtonClassType   ButtonClassType
	Style             ButtonStyleType
	Size              ButtonSizeType
	ButtonElementType ButtonElementType
}

func (*ButtonProps) BuildClassNames

func (bp *ButtonProps) BuildClassNames() (classNames string)

type ButtonSizeType

type ButtonSizeType string
const LargeButton ButtonSizeType = "lg"
const SmallButton ButtonSizeType = "sm"

type ButtonStyleType

type ButtonStyleType string
const OutlineButton ButtonStyleType = "outline"
const SolidButton ButtonStyleType = ""

type ButtonType

type ButtonType string
const ResetButton ButtonType = "reset"
const SubmitButton ButtonType = "submit"

Jump to

Keyboard shortcuts

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