Skip to content

Commit

Permalink
Update MediaPlaceholder README.md (#17980)
Browse files Browse the repository at this point in the history
* Update MediaPlaceholder README.md

This change updates the readme to properly document the `value` property.

See issue here: #17967

* Update MediaUpload README.md
  • Loading branch information
phwebi authored and mkevins committed Oct 19, 2019
1 parent a26a263 commit ba4793b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ The argument of the callback is an object containing the following properties:

### value

Media ID (or media IDs if multiple is true) to be selected by default when opening the media library.
An object or an array of objects that contain media ID (`id` property) to be selected by default when opening the media library.

- Type: `Number|Array`
- Type: `Object|Array`
- Required: No
- Platform: Web

Expand Down
6 changes: 3 additions & 3 deletions packages/block-editor/src/components/media-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function MyMediaUploader() {
<MediaUpload
onSelect={ ( media ) => console.log( 'selected ' + media.length ) }
allowedTypes={ ALLOWED_MEDIA_TYPES }
value={ mediaId }
value={ media }
render={ ( { open } ) => (
<Button onClick={ open }>
Open Media Library
Expand Down Expand Up @@ -76,9 +76,9 @@ Whether to allow multiple selections or not.

### value

Media ID (or media IDs if multiple is true) to be selected by default when opening the media library.
An object or an array of objects that contain media ID (`id` property) to be selected by default when opening the media library.

- Type: `Number|Array`
- Type: `Object|Array`
- Required: No
- Platform: Web

Expand Down

0 comments on commit ba4793b

Please sign in to comment.