Set icon to sidebar’s complementary area

This commit is contained in:
jordi fita mas 2024-06-15 03:34:15 +02:00
parent e39ee28b9f
commit 6fa048cf62
3 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import { useEffect } from '@wordpress/element';
import { ComplementaryArea, store as interfaceStore } from '@wordpress/interface';
import { Panel } from '@wordpress/components';
import { BlockInspector } from '@wordpress/block-editor';
import { drawerRight } from '@wordpress/icons';
import { scope } from './constants';
const SIDEBARS_BLOCK = 'tipus/block';
@ -18,6 +19,7 @@ export default function Sidebar () {
scope={ scope }
identifier={ SIDEBARS_BLOCK }
isActiveByDefault={ true }
icon={ drawerRight }
>
<Panel>
<BlockInspector />

1
package-lock.json generated
View File

@ -15,6 +15,7 @@
"@wordpress/data": "^10.0.0",
"@wordpress/element": "6.0.0",
"@wordpress/format-library": "5.0.0",
"@wordpress/icons": "10.0.0",
"@wordpress/interface": "6.0.0"
},
"devDependencies": {

View File

@ -17,6 +17,7 @@
"@wordpress/data": "^10.0.0",
"@wordpress/element": "6.0.0",
"@wordpress/format-library": "5.0.0",
"@wordpress/icons": "10.0.0",
"@wordpress/interface": "6.0.0"
},
"devDependencies": {