@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
34 lines • 1.4 kB
TypeScript
import type { WidgetRuntimeAction } from '@wordpress/widget-primitives';
type WidgetActionsProps = {
/**
* The instance whose actions these are.
*/
uuid: string;
/**
* The actions this menu materializes. The host routes by relevance:
* the footer takes `'high'` and `'medium'`, this menu the rest, and
* every action for full-bleed widgets, which have no footer.
*/
actions: WidgetRuntimeAction[];
};
/**
* Materializes widget actions as a "more" menu in the chrome: a three-dots
* trigger surfacing each given action. This host mounts a real anchor for the
* link fulfillment, so middle-click and copy address survive; the menu exposes
* it as a menu item rather than as a link.
*
* A target the host recognizes as one of its own routes mounts the host
* router's link through `HostLink`, so it navigates client-side.
*
* A callback action mounts a menu item, disabled while its promise settles.
* That state lives with the instance, so it survives the popup closing and
* customize mode.
*
* As a trailing header section it reserves its own footprint, so the
* collapsible controls beside it never plan for space it occupies.
*
* @param {WidgetActionsProps} props Component props.
*/
export declare function WidgetActions({ uuid, actions, }: WidgetActionsProps): React.ReactNode;
export {};
//# sourceMappingURL=widget-actions.d.ts.map