From 13d243aaf4505da4c68b7dac39b8d2eafcc8c918 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Fri, 12 Apr 2019 15:12:09 +0800 Subject: [PATCH] Tidy up docs --- .../src/components/inner-blocks/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/block-editor/src/components/inner-blocks/README.md b/packages/block-editor/src/components/inner-blocks/README.md index 4ad0c93c6e4aa..321f9a71d0d11 100644 --- a/packages/block-editor/src/components/inner-blocks/README.md +++ b/packages/block-editor/src/components/inner-blocks/README.md @@ -115,16 +115,15 @@ If the block is a top level block: the locking of the Custom Post Type is used. ### `renderAppender` * **Type:** `Function` -* **Default:** - `null`. By default the `` component is used which automatically inserts whichever block is configured as the default block via `wp.blocks.getDefaultBlockName` (typically `paragraph`). +* **Default:** - `undefined`. When `renderAppender` is not specific the `` component is as a default. It automatically inserts whichever block is configured as the default block via `wp.blocks.setDefaultBlockName` (typically `paragraph`). -Determines the placeholder behaviour when the Block is initially inserted. You may pass a render function to provide your own placeholder as required. +A 'render prop' function that can be used to customize the block's appender. #### Notes * For convenience two predefined appender components are exposed on `InnerBlocks` which can be consumed within the render function: - - `` - display a `+` (plus) icon inside a box which fills the Block preview. No default Block is inserted. Clicking the appender reveals the Block picker UI. - - `` - provides the default "auto-insert" functionality described above under `default`. -* Consumers are also free to pass any valid render function which provides full -flexibility to define a bespoke appender + - `` - display a `+` (plus) icon button that, when clicked, displays the block picker menu. No default Block is inserted. + - `` - display the default block appender as set by `wp.blocks.setDefaultBlockName`. Typically this is the `paragraph` block. +* Consumers are also free to pass any valid render function. This provides the full flexibility to define a bespoke block appender. #### Example usage