fix(docs-widgets-list): fix code indentation (#4879)
This commit is contained in:
parent
e6a0530023
commit
2f99b10e35
@ -20,56 +20,60 @@ The select widget allows you to pick a string value from a dropdown menu.
|
|||||||
* `multiple`: accepts a boolean; defaults to `false`
|
* `multiple`: accepts a boolean; defaults to `false`
|
||||||
* `min`: minimum number of items; ignored if **multiple** is `false`
|
* `min`: minimum number of items; ignored if **multiple** is `false`
|
||||||
* `max`: maximum number of items; ignored if **multiple** is `false`
|
* `max`: maximum number of items; ignored if **multiple** is `false`
|
||||||
|
|
||||||
* **Example** (options as strings):
|
* **Example** (options as strings):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- label: "Align Content"
|
- label: "Align Content"
|
||||||
name: "align"
|
name: "align"
|
||||||
widget: "select"
|
widget: "select"
|
||||||
options: ["left", "center", "right"]
|
options: ["left", "center", "right"]
|
||||||
```
|
```
|
||||||
|
|
||||||
Selecting the `center` option, will save the value as:
|
Selecting the `center` option, will save the value as:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
align: "center"
|
||||||
|
```
|
||||||
|
|
||||||
```yaml
|
|
||||||
align: "center"
|
|
||||||
```
|
|
||||||
* **Example** (options as objects):
|
* **Example** (options as objects):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- label: "City"
|
- label: "City"
|
||||||
name: "airport-code"
|
name: "airport-code"
|
||||||
widget: "select"
|
widget: "select"
|
||||||
options:
|
options:
|
||||||
- { label: "Chicago", value: "ORD" }
|
- { label: "Chicago", value: "ORD" }
|
||||||
- { label: "Paris", value: "CDG" }
|
- { label: "Paris", value: "CDG" }
|
||||||
- { label: "Tokyo", value: "HND" }
|
- { label: "Tokyo", value: "HND" }
|
||||||
```
|
```
|
||||||
|
|
||||||
Selecting the `Chicago` option, will save the value as:
|
Selecting the `Chicago` option, will save the value as:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
airport-code: "ORD"
|
||||||
|
```
|
||||||
|
|
||||||
```yaml
|
|
||||||
airport-code: "ORD"
|
|
||||||
```
|
|
||||||
* **Example** (multiple):
|
* **Example** (multiple):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- label: "Tags"
|
- label: "Tags"
|
||||||
name: "tags"
|
name: "tags"
|
||||||
widget: "select"
|
widget: "select"
|
||||||
multiple: true
|
multiple: true
|
||||||
options: ["Design", "UX", "Dev"]
|
options: ["Design", "UX", "Dev"]
|
||||||
default: ["Design"]
|
default: ["Design"]
|
||||||
```
|
```
|
||||||
|
|
||||||
* **Example** (min/max):
|
* **Example** (min/max):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- label: "Tags"
|
- label: "Tags"
|
||||||
name: "tags"
|
name: "tags"
|
||||||
widget: "select"
|
widget: "select"
|
||||||
multiple: true
|
multiple: true
|
||||||
min: 1
|
min: 1
|
||||||
max: 3
|
max: 3
|
||||||
options: ["Design", "UX", "Dev"]
|
options: ["Design", "UX", "Dev"]
|
||||||
default: ["Design"]
|
default: ["Design"]
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user