docs(fix): widget example code layout on Site (#1606)

* Fix widget example layout

* Stop running MarkDown through Prettier.
This commit is contained in:
Tony Alves
2018-08-14 07:37:07 -07:00
committed by Caleb
parent 05622b8eee
commit 583377bc92
16 changed files with 136 additions and 162 deletions

View File

@ -14,46 +14,39 @@ The list widget allows you to create a repeatable item in the UI which saves as
- `field`: a single widget field to be repeated
- `fields`: a nested list of multiple widget fields to be included in each repeatable iteration
- **Example** (`field`/`fields` not specified):
```yaml
- label: 'Tags'
name: 'tags'
widget: 'list'
default: ['news']
```
```yaml
- label: 'Tags'
name: 'tags'
widget: 'list'
default: ['news']
```
- **Example** (`allow_add` marked `false`):
```yaml
- label: 'Tags'
name: 'tags'
widget: 'list'
allow_add: false
default: ['news']
```
```yaml
- label: 'Tags'
name: 'tags'
widget: 'list'
allow_add: false
default: ['news']
```
- **Example** (with `field`):
```yaml
- label: 'Gallery'
name: 'galleryImages'
widget: 'list'
field:
- { label: Image, name: image, widget: image }
```
```yaml
- label: 'Gallery'
name: 'galleryImages'
widget: 'list'
field:
- { label: Image, name: image, widget: image }
```
- **Example** (with `fields`):
```yaml
- label: 'Testimonials'
name: 'testimonials'
widget: 'list'
fields:
- { label: Quote, name: quote, widget: string, default: 'Everything is awesome!' }
- label: Author
name: author
widget: object
fields:
- { label: Name, name: name, widget: string, default: 'Emmet' }
- { label: Avatar, name: avatar, widget: image, default: '/img/emmet.jpg' }
```
```yaml
- label: 'Testimonials'
name: 'testimonials'
widget: 'list'
fields:
- { label: Quote, name: quote, widget: string, default: 'Everything is awesome!' }
- label: Author
name: author
widget: object
fields:
- { label: Name, name: name, widget: string, default: 'Emmet' }
- { label: Avatar, name: avatar, widget: image, default: '/img/emmet.jpg' }
```