ExternalPlugins: Restore backward compatability for util function (#113735)

* ExternalPlugins: Restore backward compatability for util function

* tweak

* fix withValue => withTitle
This commit is contained in:
Torkel Ödegaard
2025-11-12 16:04:35 +01:00
committed by GitHub
parent 16ddd536ab
commit 0392bf5724
@@ -9,8 +9,13 @@ import { OptionsWithTextFormatting } from '@grafana/schema';
*/
export function addTextSizeOptions<T extends OptionsWithTextFormatting>(
builder: PanelOptionsEditorBuilder<T>,
options: { withValue?: boolean; withTitle?: boolean; withPercentChange?: boolean }
options: { withValue?: boolean; withTitle?: boolean; withPercentChange?: boolean } = { withTitle: true }
) {
// if called from old plugins when parameter was withTitle boolean
if (typeof options === 'boolean') {
options = { withTitle: options };
}
const category = [t('grafana-ui.builder.text.category-text-size', 'Text size')];
if (options.withTitle) {
builder.addNumberInput({