Skip to content

Commit

Permalink
docs: Clarify class name creation and tidy up doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tofumatt committed Jul 19, 2018
1 parent 629074e commit cf5fe53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/components/inner-blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ If the block is a top level block: the locking of the Custom Post Type is used.

To achieve distinct arrangements of nested blocks, you may assign layout as an object. When assigned, the rendered output will assign a layout-specific class which can be used in your block stylesheet to effect the visual arrangement of nested blocks.

A layout is an object where each key is the slug of the layout (used also in the applied class to the block), and its value an object consisting of:
A layout is an object where each key is the `slug` of the layout and its value an object consisting of:

- Icon (`icon: string`): The slug of the Dashicon to use in controls presented to the user in moving between layouts
- Reference: https://developer.wordpress.org/resource/dashicons/
- Label (`label: string`): The text to display in the controls presented to the user in moving between layouts

The `slug` is also used to create the class name for the block. A slug of `normal` would output the class `"layout-normal"`.

**Example:**

```jsx
Expand Down

0 comments on commit cf5fe53

Please sign in to comment.