ExternalPlugins: Restore backward compatability for util function (#113735)
* ExternalPlugins: Restore backward compatability for util function * tweak * fix withValue => withTitle
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user