@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
8 lines (7 loc) • 965 B
Source Map (JSON)
{
"version": 3,
"sources": ["../../../../src/components/widget-settings/utils/get-widget-settings.ts"],
"sourcesContent": ["import { sprintf, __ } from '@wordpress/i18n';\nimport type { WidgetType } from '@wordpress/widget-primitives';\n\n/**\n * Localized \"<Widget> settings\" label, falling back to a generic title\n * when the type declares none.\n *\n * @param {WidgetType} widgetType Type backing the open instance.\n * @return {string} The drawer/trigger title.\n */\nexport function getWidgetSettingsTitle( widgetType?: WidgetType ): string {\n\treturn widgetType?.title\n\t\t? sprintf(\n\t\t\t\t/* translators: %s: Widget title. */\n\t\t\t\t__( '%s settings' ),\n\t\t\t\twidgetType.title\n\t\t )\n\t\t: __( 'Widget settings' );\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA4B;AAUrB,SAAS,uBAAwB,YAAkC;AACzE,SAAO,YAAY,YAChB;AAAA;AAAA,QAEA,gBAAI,aAAc;AAAA,IAClB,WAAW;AAAA,EACX,QACA,gBAAI,iBAAkB;AAC1B;",
"names": []
}