Skip to content

Commit

Permalink
sidebar to panel
Browse files Browse the repository at this point in the history
  • Loading branch information
n2erjo00 committed May 21, 2024
1 parent 9ea4204 commit 55f9709
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -829,11 +829,11 @@ function MyPluginSidebar() {
return el(
PluginSidebar,
{
name: 'my-sidebar',
title: 'My sidebar title',
name: 'my-panel',
title: 'My panel title',
icon: moreIcon,
},
el( PanelBody, {}, __( 'My sidebar content' ) )
el( PanelBody, {}, __( 'My panel content' ) )
);
}
```
Expand All @@ -846,8 +846,8 @@ import { PluginSidebar } from '@wordpress/editor';
import { more } from '@wordpress/icons';

const MyPluginSidebar = () => (
<PluginSidebar name="my-sidebar" title="My sidebar title" icon={ more }>
<PanelBody>{ __( 'My sidebar content' ) }</PanelBody>
<PluginSidebar name="my-panel" title="My panel title" icon={ more }>
<PanelBody>{ __( 'My panel content' ) }</PanelBody>
</PluginSidebar>
);
```
Expand Down Expand Up @@ -877,10 +877,10 @@ function MySidebarMoreMenuItem() {
return React.createElement(
PluginSidebarMoreMenuItem,
{
target: 'my-sidebar',
target: 'my-panel',
icon: moreIcon,
},
__( 'My sidebar title' )
__( 'My panel title' )
);
}
```
Expand All @@ -892,8 +892,8 @@ import { PluginSidebarMoreMenuItem } from '@wordpress/editor';
import { more } from '@wordpress/icons';

const MySidebarMoreMenuItem = () => (
<PluginSidebarMoreMenuItem target="my-sidebar" icon={ more }>
{ __( 'My sidebar title' ) }
<PluginSidebarMoreMenuItem target="my-panel" icon={ more }>
{ __( 'My panel title' ) }
</PluginSidebarMoreMenuItem>
);
```
Expand Down

0 comments on commit 55f9709

Please sign in to comment.