feat(style): compose generated class states
Add CssClass/CssClasses with/with_if helpers so nested partial view data can compose generated CSS constants without ad hoc class strings. req: style/003 req: component/003
This commit is contained in:
@@ -141,6 +141,9 @@ fn generated_css_classes_join_for_hemplate_dynamic_class_attrs() {
|
||||
|
||||
assert_eq!(classes.as_str(), "work-card is-selected");
|
||||
assert_eq!(classes.to_string(), "work-card is-selected");
|
||||
assert_eq!(CARD.with(SELECTED).as_str(), "work-card is-selected");
|
||||
assert_eq!(CARD.with_if(true, SELECTED).as_str(), "work-card is-selected");
|
||||
assert_eq!(CARD.with_if(false, SELECTED).as_str(), "work-card");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user