-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sarah <[email protected]>
- Loading branch information
1 parent
4633355
commit 793a9ba
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: bool:* | ||
--- | ||
|
||
`bool:*` controls the presence of an attribute in an element. | ||
When the value is `truthy` it adds the `attribute` to the element. | ||
Alternatively, when the value is `falsy` it removes the `attribute` from the element. | ||
This attribute is most useful for Web Components. | ||
|
||
```tsx | ||
<my-element bool:status={prop.value} /> | ||
``` | ||
|
||
```tsx | ||
// Assuming `prop.value` is `truthy`, then it becomes | ||
<my-element status /> | ||
|
||
// And when `falsy`, then it becomes | ||
<my-element /> | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters