@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
20 lines (19 loc) • 801 B
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
let _wordpress_i18n = require("@wordpress/i18n");
// packages/widget-dashboard/src/components/widget-settings/utils/get-widget-settings.ts
/**
* Localized "<Widget> settings" label, falling back to a generic title
* when the type declares none.
*
* @param {WidgetType} widgetType Type backing the open instance.
* @return {string} The drawer/trigger title.
*/
function getWidgetSettingsTitle(widgetType) {
return widgetType?.title ? (0, _wordpress_i18n.sprintf)((0, _wordpress_i18n.__)("%s settings"), widgetType.title) : (0, _wordpress_i18n.__)("Widget settings");
}
exports.getWidgetSettingsTitle = getWidgetSettingsTitle;
//# sourceMappingURL=get-widget-settings.cjs.map