UNPKG

@wordpress/components

Version:
39 lines 1.4 kB
export default ToolbarGroup; /** * Renders a collapsible group of controls * * The `controls` prop accepts an array of sets. A set is an array of controls. * Controls have the following shape: * * ``` * { * icon: string, * title: string, * subscript: string, * onClick: Function, * isActive: boolean, * isDisabled: boolean * } * ``` * * For convenience it is also possible to pass only an array of controls. It is * then assumed this is the only set. * * Either `controls` or `children` is required, otherwise this components * renders nothing. * * @param {Object} props Component props. * @param {Array} [props.controls] The controls to render in this toolbar. * @param {WPElement} [props.children] Any other things to render inside the toolbar besides the controls. * @param {string} [props.className] Class to set on the container div. * @param {boolean} [props.isCollapsed] Turns ToolbarGroup into a dropdown menu. * @param {string} [props.title] ARIA label for dropdown menu if is collapsed. */ declare function ToolbarGroup({ controls, children, className, isCollapsed, title, ...props }: { controls?: any[] | undefined; children?: any; className?: string | undefined; isCollapsed?: boolean | undefined; title?: string | undefined; }): JSX.Element | null; //# sourceMappingURL=index.d.ts.map