Theme roles now have a variant field

This commit is contained in:
Sasha Koshka 2023-08-10 17:49:22 -04:00
parent 2884604fdd
commit 8e25397a05
1 changed files with 7 additions and 2 deletions

View File

@ -16,11 +16,16 @@ type Role struct {
// - Dial
// This should correspond directly to the type name of the object.
Object string
// Variant is an optional field to be used when an object has one or
// more soft variants under one type. For example, an object "Slider"
// may have variations "horizontal" and "vertical".
Variant string
}
// R is shorthand for creating a Role structure.
func R (pack, object string) Role {
return Role { Package: pack, Object: object }
func R (pack, object, variant string) Role {
return Role { Package: pack, Object: object, Variant: variant }
}
// Color represents a color ID.