Document the icon and colour names a forecast can carry
This commit is contained in:
@@ -174,6 +174,28 @@ carry one of them literally is asking for a value this engine reads as a name.
|
||||
|
||||
Enforced on the server as well as in the editor.
|
||||
|
||||
## Icon and colour names
|
||||
|
||||
A forecast is a `list` of records, one per column, each shaped
|
||||
`{label, icon, value}` with an optional `color`. The flow decides what a
|
||||
column is called and which glyph it gets; the widget only draws it.
|
||||
|
||||
```json
|
||||
[{"label": "Today", "icon": "cloud-rain", "color": "primary", "value": "14°"}]
|
||||
```
|
||||
|
||||
`icon` and `color` are names from a fixed vocabulary, the same one the icon
|
||||
widget's picker offers:
|
||||
|
||||
| | Names |
|
||||
|---|---|
|
||||
| Icons | `sun`, `moon`, `cloudy`, `cloud-rain`, `cloud-drizzle`, `cloud-snow`, `cloud-lightning`, `cloud-fog`, `wind`, `umbrella`, `snowflake`, `droplets`, `thermometer`, `thermometer-sun`, `flame`, `fan`, `sun-snow`, `door-open`, `house`, `bed`, `lightbulb`, `plug`, `music`, `volume-2`, `volume-x`, `zap`, `battery-charging`, `arrow-up`, `arrow-down`, `triangle-alert`, `check`, `circle-check` |
|
||||
| Colours | `default`, `muted`, `primary`, `success`, `danger` |
|
||||
|
||||
An empty icon draws nothing. An unknown one draws a placeholder glyph and an
|
||||
unknown colour draws as `default`; either warns once in the browser console,
|
||||
listing the names it expected.
|
||||
|
||||
## Type failures
|
||||
|
||||
A value that does not match its port's declaration raises on the node that
|
||||
|
||||
Reference in New Issue
Block a user