UNPKG

@wordpress/widget-dashboard

Version:

Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.

27 lines • 1.16 kB
import type { WidgetAction } from '@wordpress/widget-primitives'; type WidgetActionsProps = { /** * 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: WidgetAction[]; }; /** * 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 (the `links` * capability from `useWidgetHost`) mounts the host router's link instead, * so it navigates client-side. * * 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({ actions, }: WidgetActionsProps): React.ReactNode; export {}; //# sourceMappingURL=widget-actions.d.ts.map