91 lines
2.2 KiB
Go
91 lines
2.2 KiB
Go
// Code generated by wa-generator. DO NOT EDIT.
|
|
|
|
package wa
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/a-h/templ"
|
|
)
|
|
|
|
// Variant represents component theme variants
|
|
type Variant string
|
|
|
|
const (
|
|
VariantBrand Variant = "brand"
|
|
VariantNeutral Variant = "neutral"
|
|
VariantSuccess Variant = "success"
|
|
VariantWarning Variant = "warning"
|
|
VariantDanger Variant = "danger"
|
|
)
|
|
|
|
// Size represents component sizes
|
|
type Size string
|
|
|
|
const (
|
|
SizeSmall Size = "small"
|
|
SizeMedium Size = "medium"
|
|
SizeLarge Size = "large"
|
|
)
|
|
|
|
// Appearance represents visual appearance styles
|
|
type Appearance string
|
|
|
|
const (
|
|
AppearanceAccent Appearance = "accent"
|
|
AppearanceFilled Appearance = "filled"
|
|
AppearanceOutlined Appearance = "outlined"
|
|
AppearanceFilledOutlined Appearance = "filled-outlined"
|
|
AppearancePlain Appearance = "plain"
|
|
)
|
|
|
|
// Orientation represents layout orientation
|
|
type Orientation string
|
|
|
|
const (
|
|
OrientationHorizontal Orientation = "horizontal"
|
|
OrientationVertical Orientation = "vertical"
|
|
)
|
|
|
|
// Placement represents popup/tooltip placement
|
|
type Placement string
|
|
|
|
const (
|
|
PlacementTop Placement = "top"
|
|
PlacementTopStart Placement = "top-start"
|
|
PlacementTopEnd Placement = "top-end"
|
|
PlacementBottom Placement = "bottom"
|
|
PlacementBottomStart Placement = "bottom-start"
|
|
PlacementBottomEnd Placement = "bottom-end"
|
|
PlacementLeft Placement = "left"
|
|
PlacementLeftStart Placement = "left-start"
|
|
PlacementLeftEnd Placement = "left-end"
|
|
PlacementRight Placement = "right"
|
|
PlacementRightStart Placement = "right-start"
|
|
PlacementRightEnd Placement = "right-end"
|
|
)
|
|
|
|
// SlotContent is a helper for creating slot content
|
|
type SlotContent struct {
|
|
Name string
|
|
Content templ.Component
|
|
}
|
|
|
|
// NewSlot creates a new SlotContent
|
|
func NewSlot(name string, content templ.Component) SlotContent {
|
|
return SlotContent{Name: name, Content: content}
|
|
}
|
|
|
|
// EmptyComponent returns a no-op templ component
|
|
func EmptyComponent() templ.Component {
|
|
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) error {
|
|
return nil
|
|
})
|
|
}
|
|
|
|
// Text creates a simple text component
|
|
func Text(s string) templ.Component {
|
|
return templ.Raw(s)
|
|
}
|