button, button:radio
Type can be button
, button:radio
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="button">
...
</discovery-tile>
{
'type' 'button'
...
'macro' <% %>
}
Name | Default |
---|---|
--warp-view-button-font-size | 1rem |
--warp-view-button-border-color | #004eff |
--warp-view-button-padding | .375rem .75rem |
--warp-view-button-label-color | #ffffff |
--warp-view-button-bg-color | #004eff |
--warp-view-button-width | auto |
--warp-view-button-border-radius | 0.25rem |
--warp-view-button-bg-disabled-color | #c0c0c0 |
--warp-view-button-disabled-border-color | #a0a0a0 |
Name | Type | Description |
---|---|---|
data | macro |
Macro to exec against The Warp 10 instance when button is clicked. |
globalParams | Option |
Global options (see above) concerning this tile |
params | Option[] |
List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] |
List of events to emit (see Events Mechanism) |
With a macro
<% 2 2 + %>
With custom data and label
{
'data' <% 2 2 + %>
'globalParams' {
'button' { 'label' 'Execute' }
}
}
Sending a complex event
{
'data' <%
RAND 100 * ROUND 'v' STORE
{
'data' ''
'events' [
{ 'tags' [ 'random' ] 'type' 'data' 'value' { 'data' $v 'params' [ { 'maxValue' 100 } ] } }
]
}
%>
}
Toggles
{
'data' [
{ 'label' 'Foo' 'value' 'foo' }
{ 'label' 'Bar' 'value' 'bar' 'active' true }
{ 'label' 'Baz' 'value' 'baz' }
]
'events' [
{ 'type' 'variable' 'tags' 'myVar' 'selector' 'myVar' }
]
}
Found an issue on this page or something missing?
Tell us onThe Lounge, the Warp 10 Community Slack.