Files
inventory-plus-plus/server/ui/svg/width.go
T
2026-07-18 18:24:37 -06:00

25 lines
383 B
Go

package svg
type (
Width struct {
*LengthAttr[WidthTag]
}
WidthP struct {
PercentageAttr[WidthTag]
}
WidthTag struct{}
)
func (l *Length) AsWidth() Width {
return Width{LengthAttr: (*LengthAttr[WidthTag])(l)}
}
func (p Percentage) AsWidth() WidthP {
return WidthP{PercentageAttr: (PercentageAttr[WidthTag])(p)}
}
func (WidthTag) PrintTag() string {
return "width"
}