Skip to content

Commit

Permalink
Merge pull request #217 from 9214/toggle
Browse files Browse the repository at this point in the history
FEAT: document TOGGLE
  • Loading branch information
greggirwin committed Feb 24, 2020
2 parents 4ee4534 + 2aa95ee commit 5f9598e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion en/vid.adoc
Expand Up @@ -735,7 +735,7 @@ In addition to keywords, it is allowed to pass settings to faces using literal v
|issue!| Specifies the color of the face's background using hex notation (#rgb, #rrggbb, #rrggbbaa).
|string!| Specifies the text to be displayed by the face.
|percent!| Sets the `data` facet (useful for `progress` and `slider` types).
|logic!| Sets the `data` facet (useful for `check` and `radio` types).
|logic!| Sets the `data` facet (useful for `toggle`, `check` and `radio` types).
|image!| Sets the image to be displayed as face's background (where applicable).
|url!| Loads the resource pointed to by the URL, then process the resource according to its loaded type.
|block!| Sets the action for the default event of the face. For panels, specifies their content.
Expand Down
19 changes: 19 additions & 0 deletions en/view.adoc
Expand Up @@ -234,6 +234,25 @@ This type represents a simple button.
|`click`| `on-click`| Triggered when the user clicks on the button.
|===

=== Toggle

This type represents a button that retains its state after being pushed.

[cols="1,4", options="header"]
|===
|Facet| Description
|`type`| `'toggle`
|`text`| Toggle's label text.
|`para`| Controls vertical and horizontal text alignment.
|`data`| `true`: toggled; `false`: untoggled (default).
|`image`| The image will be displayed inside the toggle. Can be combined with a text.
|===

[cols="1,1,3", options="header"]
|===
|Event type| Handler| Description
|`change`| `on-change`| Triggered when the toggle state is changed by a user action.
|===

=== Check

Expand Down

0 comments on commit 5f9598e

Please sign in to comment.