-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add BlockMover component readme (#24851)
- Loading branch information
1 parent
bc77362
commit a4e381b
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
packages/block-editor/src/components/block-mover/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Block mover | ||
|
||
Block movers allow moving blocks inside the editor using up and down buttons. | ||
|
||
![Block mover screenshot](https://make.wordpress.org/core/files/2020/08/block-mover-screenshot.png) | ||
|
||
|
||
## Table of contents | ||
|
||
1. [Development guidelines](#development-guidelines) | ||
2. [Related components](#related-components) | ||
|
||
|
||
## Development guidelines | ||
|
||
### Usage | ||
|
||
Shows the block mover buttons in the block toolbar. | ||
|
||
```jsx | ||
import { BlockMover } from '@wordpress/block-editor'; | ||
const MyMover = () => <BlockMover clientIds={ [ clientId ] } />; | ||
``` | ||
|
||
### Props | ||
|
||
#### clientIds | ||
|
||
Blocks IDs | ||
|
||
- Type: `Array` | ||
|
||
|
||
## Related components | ||
Block Editor components are components that can be used to compose the UI of your block editor. Thus, they can only be used under a [BlockEditorProvider](https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/provider/README.md) in the components tree. |