parent
16f2d2e017
commit
1a2fefe4e5
1 changed files with 3 additions and 3 deletions
|
@ -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" }
|
||||||
}
|
}
|
||||||
# ;
|
# ;
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue