fix formatting and merging if chains in attributes (#2697)

* fix formatting and merging if chains in attributes

* fix autoformat if attribute chains

* Fix IfAttributeValue ToTokens implementation

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Evan AlmloffandJonathan Kelley authored and GitHub committed 2024-07-24 18:56:21 -07:00
1 parent a6e41e9d68
commit 7f210633eb
8 files changed
+301 -145

No files matched your search

+3
View File
@@ -85,6 +85,9 @@ fn app() -> Element {
class: "{asd}",
// if statements can be used to conditionally render attributes
class: if formatting.contains("form") { "{asd}" },
// longer if chains also work
class: if formatting.contains("form") { "{asd}" } else if formatting.contains("my other form") { "{asd}" },
class: if formatting.contains("form") { "{asd}" } else if formatting.contains("my other form") { "{asd}" } else { "{asd}" },
div {
class: {
const WORD: &str = "expressions";