core/button/variants.go

Functions

Functions

func String

String returns a human-readable name for the variant.

func (v Variant) String() string {
	switch v {
	case Filled:
		return variantFilled
	case Outlined:
		return variantOutlined
	case TextOnly:
		return variantTextOnly
	case Tonal:
		return variantTonal
	default:
		return variantUnknown
	}
}

func String

String returns a human-readable name for the size.

func (s Size) String() string {
	switch s {
	case Small:
		return sizeSmall
	case Medium:
		return sizeMedium
	case Large:
		return sizeLarge
	default:
		return variantUnknown
	}
}