-
-
Notifications
You must be signed in to change notification settings - Fork 331
Open
Description
It would be great to allow custom CSS class providers
Currently it supports multiple concrete types, including []CSSClass where CSSClass is an interface with ClassName() string func.
Probably the easiest way to go is to add CSSClass support itself here:
func (cp *cssProcessor) Add(item any) {
switch c := item.(type) {
/* ... */
case []CSSClass:
for _, item := range c {
cp.Add(item)
}
case func() CSSClass:
cp.AddClassName(c().ClassName(), true)
case CSSClass: // <---------------------
cp.AddClassName(c.ClassName(), true)
default:
cp.AddClassName(unknownTypeClassName, true)
}
}Thanks.
Metadata
Metadata
Assignees
Labels
No labels