-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation & il8n scaffolding for ui-button-group
- Loading branch information
Showing
7 changed files
with
90 additions
and
80 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
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,37 @@ | ||
--- | ||
props: | ||
Group: Defines which group of the UI Dashboard this widget will render in. | ||
Size: Controls the width of the button with respect to the parent group. Maximum value is the width of the group. | ||
Label: The text shown within the button. | ||
Appearance: Specify whether the shape of the widget should be rectangular or have rounded corners. | ||
Use theme colors: Specify whether the theme colors should be used. If not active, custom colors can be specified for each option separately. | ||
Options: Specify which options need to be displayed. Each option can specify a label, icon, value and color. | ||
Topic: The text that needs to be send in the msg.topic field. | ||
Passthrough: Specify whether input messages should be passed through as output messages. | ||
controls: | ||
enabled: | ||
example: true | false | ||
description: Allow control over whether or not the button is clickable. | ||
dynamic: | ||
Class: | ||
payload: msg.class | ||
structure: ["String"] | ||
--- | ||
|
||
<script setup> | ||
</script> | ||
|
||
# Button `ui-button-grup` | ||
|
||
Adds a set of buttons that act as a multi-state switch to your dashboard. When an individual button is clicked, it will become active and all other buttons in the group will become inactive, with the newly selected value being emitted from the node in Node-RED. | ||
|
||
The selected option can be set by sending a `msg.payload` with the value of the button to be selected. | ||
|
||
## Properties | ||
|
||
<PropsTable/> | ||
|
||
## Examples | ||
|
||
![Examples of a Button Group](/images/node-examples/ui-button-group.png "Example of a Button Group"){data-zoomable} | ||
*Example of some rendered button groups in a Dashboard.* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,26 @@ | ||
|
||
<script type="text/html" data-help-name="ui-button-group"> | ||
<p>A Node-RED node to show a switch with multiple buttons in the Node-RED Dashboard.</p> | ||
<p>The active selection can be dynamically set by sending a <code>msg.payload</code> which matches a respective option's value.</p> | ||
<h3>Properties</h3> | ||
<p><strong>Label:</strong><br/> | ||
The label that will be displayed on the left side of the button.</p> | ||
<p><strong>Appearance:</strong><br/> | ||
Specify whether the shape of the widget should be rectangular or have rounded corners.</p> | ||
<p><strong>Use theme colors:</strong><br/> | ||
Specify whether the theme colors should be used. If not active, custom colors can be specified for each option separately.</p> | ||
<p><strong>Passthrough:</strong><br/> | ||
Specify whether input messages should be passed through as output messages | ||
</p> | ||
<p><strong>Options:</strong><br/> | ||
Specify which options need to be displayed: | ||
<ul> | ||
<li><i>Label: </i>(optional) The description that will be displayed.</li> | ||
<li><i>Icon: </i>(optional) The icon to display for the given option.</li> | ||
<li><i>Value: </i>The value that will be send in input and output messages.</li> | ||
<li><i>Color: </i>The color of the option in the switch.</li> | ||
</ul> | ||
</p> | ||
<p><strong>Topic:</strong><br/> | ||
The text that needs to be send in the <code>msg.topic</code> field.</p> | ||
</script> |
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,14 @@ | ||
{ | ||
"ui-button-group": { | ||
"label": { | ||
"group": "Group", | ||
"size": "Size", | ||
"icon": "Icon", | ||
"label": "Label", | ||
"colors": "Colors", | ||
"options": "Options", | ||
"appearance": "Appearance", | ||
"tcolors": "Use theme colors" | ||
} | ||
} | ||
} |
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
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