UNPKG

@grafana/ui

Version:
59 lines (54 loc) 1.62 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var i18n = require('@grafana/i18n'); "use strict"; function addTextSizeOptions(builder, options = { withTitle: true }) { if (typeof options === "boolean") { options = { withTitle: options }; } const category = [i18n.t("grafana-ui.builder.text.category-text-size", "Text size")]; if (options.withTitle) { builder.addNumberInput({ path: "text.titleSize", category, name: i18n.t("grafana-ui.builder.text.name-title", "Title"), settings: { placeholder: i18n.t("grafana-ui.builder.text.placeholder-title", "Auto"), integer: false, min: 1, max: 200 }, defaultValue: void 0 }); } if (options.withValue !== false) { builder.addNumberInput({ path: "text.valueSize", category, name: i18n.t("grafana-ui.builder.text.name-value", "Value"), settings: { placeholder: i18n.t("grafana-ui.builder.text.placeholder-value", "Auto"), integer: false, min: 1, max: 200 }, defaultValue: void 0 }); } if (options.withPercentChange) { builder.addNumberInput({ path: "text.percentSize", category, name: i18n.t("grafana-ui.builder.text.name-percent-change", "Percent change"), settings: { placeholder: i18n.t("grafana-ui.builder.text.placeholder-percent-change", "Auto"), integer: false, min: 1, max: 200 }, defaultValue: void 0 }); } } exports.addTextSizeOptions = addTextSizeOptions; //# sourceMappingURL=text.cjs.map