fix(docs-widgets-list): fix code indentation (#4879)

This commit is contained in:
Claire Annan 2021-01-27 05:40:23 -05:00 committed by GitHub
parent e6a0530023
commit 2f99b10e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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`
* `min`: minimum number of items; ignored if **multiple** is `false`
* `max`: maximum number of items; ignored if **multiple** is `false`
* **Example** (options as strings):
```yaml
- label: "Align Content"
name: "align"
widget: "select"
options: ["left", "center", "right"]
```
```yaml
- label: "Align Content"
name: "align"
widget: "select"
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):
```yaml
- label: "City"
name: "airport-code"
widget: "select"
options:
- { label: "Chicago", value: "ORD" }
- { label: "Paris", value: "CDG" }
- { label: "Tokyo", value: "HND" }
```
```yaml
- label: "City"
name: "airport-code"
widget: "select"
options:
- { label: "Chicago", value: "ORD" }
- { label: "Paris", value: "CDG" }
- { 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):
```yaml
- label: "Tags"
name: "tags"
widget: "select"
multiple: true
options: ["Design", "UX", "Dev"]
default: ["Design"]
```
```yaml
- label: "Tags"
name: "tags"
widget: "select"
multiple: true
options: ["Design", "UX", "Dev"]
default: ["Design"]
```
* **Example** (min/max):
```yaml
- label: "Tags"
name: "tags"
widget: "select"
multiple: true
min: 1
max: 3
options: ["Design", "UX", "Dev"]
default: ["Design"]
```
```yaml
- label: "Tags"
name: "tags"
widget: "select"
multiple: true
min: 1
max: 3
options: ["Design", "UX", "Dev"]
default: ["Design"]
```