UNPKG

@wordpress/widget-dashboard

Version:

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

23 lines (22 loc) • 890 B
import { useRuntimeActions } from "../../hooks/use-runtime-actions.mjs"; import { splitWidgetActions } from "../../utils/split-widget-actions.mjs"; import { WidgetFooter } from "../widget-footer/index.mjs"; import { jsx } from "react/jsx-runtime"; // packages/widget-dashboard/src/components/widget-frame/widget-frame-footer.tsx /** * The frame's footer. Subscribes to the instance's runtime actions here, * so a declaration never re-renders the body. * * @param {WidgetFrameFooterProps} props Component props. */ function WidgetFrameFooter({ widget, widgetType, editMode = false }) { const runtimeActions = useRuntimeActions(widget.uuid); const { footer } = splitWidgetActions(widgetType, runtimeActions); return /* @__PURE__ */ jsx(WidgetFooter, { uuid: widget.uuid, actions: footer, editMode }); } export { WidgetFrameFooter }; //# sourceMappingURL=widget-frame-footer.mjs.map