Chore: DataSourcePicker- Replace HorizontalGroup with Stack (#86389)

This commit is contained in:
Laura Fernández 2024-04-17 11:50:58 +02:00 committed by GitHub
parent dcfaf7e434
commit 9b27d5a0c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 6 deletions

View File

@ -697,9 +697,6 @@ exports[`better eslint`] = {
"packages/grafana-runtime/src/analytics/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"packages/grafana-runtime/src/components/DataSourcePicker.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"packages/grafana-runtime/src/config.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],

View File

@ -10,7 +10,7 @@ import {
SelectableValue,
} from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';
import { ActionMeta, HorizontalGroup, PluginSignatureBadge, Select } from '@grafana/ui';
import { ActionMeta, PluginSignatureBadge, Select, Stack } from '@grafana/ui';
import { getDataSourceSrv } from '../services/dataSourceSrv';
@ -209,9 +209,9 @@ export class DataSourcePicker extends PureComponent<DataSourcePickerProps, DataS
getOptionLabel={(o) => {
if (o.meta && isUnsignedPluginSignature(o.meta.signature) && o !== value) {
return (
<HorizontalGroup align="center" justify="space-between" height="auto">
<Stack alignItems="center" justifyContent="space-between">
<span>{o.label}</span> <PluginSignatureBadge status={o.meta.signature} />
</HorizontalGroup>
</Stack>
);
}
return o.label || '';