@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
1 lines • 982 B
Source Map (JSON)
{"version":3,"file":"get-widget-settings.cjs","names":["sprintf","__"],"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\t)\n\t\t: __( 'Widget settings' );\n}\n"],"mappings":";;;;;;;;;;;;;;AAUA,SAAgB,uBAAwB,YAAkC;CACzE,OAAO,YAAY,SAAA,GAChBA,gBAAAA,QAAAA,EAAAA,GAEAC,gBAAAA,GAAAA,CAAI,aAAc,GAClB,WAAW,KACZ,KAAA,GACCA,gBAAAA,GAAAA,CAAI,iBAAkB;AAC1B"}