UNPKG

@wordpress/widget-dashboard

Version:

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

15 lines (14 loc) • 587 B
import { __, sprintf } from "@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 ? sprintf(__("%s settings"), widgetType.title) : __("Widget settings"); } export { getWidgetSettingsTitle }; //# sourceMappingURL=get-widget-settings.mjs.map