@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
28 lines (27 loc) • 1.22 kB
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
let ______hooks_use_runtime_actions_ts = require("../../hooks/use-runtime-actions.cjs");
let ______utils_split_widget_actions_ts = require("../../utils/split-widget-actions.cjs");
let ___widget_footer_index_ts = require("../widget-footer/index.cjs");
let react_jsx_runtime = require("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 = (0, ______hooks_use_runtime_actions_ts.useRuntimeActions)(widget.uuid);
const { footer } = (0, ______utils_split_widget_actions_ts.splitWidgetActions)(widgetType, runtimeActions);
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(___widget_footer_index_ts.WidgetFooter, {
uuid: widget.uuid,
actions: footer,
editMode
});
}
exports.WidgetFrameFooter = WidgetFrameFooter;
//# sourceMappingURL=widget-frame-footer.cjs.map