ToolsPanelHeader 是一个实验性组件,用于渲染工具面板的标题和菜单。它通常由父组件 ToolsPanel 自动生成,不建议直接使用。
This component renders a tools panel’s header including a menu.
This component is generated automatically by its parent
ToolsPanel.
dropdownMenuProps: {}The dropdown menu props to configure the panel’s DropdownMenu.
DropdownMenuPropsheadingLevel: 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6'The heading level of the panel’s header.
2label: stringText to be displayed within the panel header. It is also passed along as the
label for the panel header’s DropdownMenu.
resetAll: () => voidThe resetAll prop provides the callback to execute when the “Reset all” menu
item is selected. Its purpose is to facilitate resetting any control values
for items contained within this header’s panel.
toggleItem: ( label: string ) => voidThis is executed when an individual control’s menu item is toggled. It
will update the panel’s menu item state and call the panel item’s onSelect or
onDeselect callbacks as appropriate.