Update documentation regarding toggles () ()

This commit is contained in:
puetzp 2024-06-16 13:15:27 +02:00 committed by GitHub
parent 16f2d2e017
commit 1a2fefe4e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,9 +115,9 @@ html! {
## Toggles: `[foo]` ## Toggles: `[foo]`
Use `[foo]` syntax to show or hide something based on a boolean expression `foo`. Use `[foo]` syntax to show or hide classes and [boolean attributes](https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML) on a HTML element based on a boolean expression `foo`.
This works on empty attributes: Toggle boolean attributes:
```rust ```rust
let allow_editing = true; let allow_editing = true;
@ -160,4 +160,4 @@ html! {
p title=[title] { "Battery staple" } p title=[title] { "Battery staple" }
} }
# ; # ;
``` ```