Peter Holmberg пре 6 година
родитељ
комит
ee4df15526

+ 5 - 3
public/app/core/components/Select/UnitPicker.tsx → packages/grafana-ui/src/components/UnitPicker/UnitPicker.tsx

@@ -1,6 +1,8 @@
 import React, { PureComponent } from 'react';
-import { getValueFormats } from '@grafana/ui';
-import { Select } from '@grafana/ui';
+
+import { Select } from '..';
+
+import { getValueFormats } from '../../utils';
 
 interface Props {
   onChange: (item: any) => void;
@@ -8,7 +10,7 @@ interface Props {
   width?: number;
 }
 
-export default class UnitPicker extends PureComponent<Props> {
+export class UnitPicker extends PureComponent<Props> {
   static defaultProps = {
     width: 12,
   };

+ 1 - 0
packages/grafana-ui/src/components/index.ts

@@ -26,3 +26,4 @@ export { ValueMappingsEditor } from './ValueMappingsEditor/ValueMappingsEditor';
 export { Gauge } from './Gauge/Gauge';
 export { Switch } from './Switch/Switch';
 export { EmptySearchResult } from './EmptySearchResult/EmptySearchResult';
+export { UnitPicker } from './UnitPicker/UnitPicker';

+ 1 - 2
public/app/plugins/panel/gauge/SingleStatValueEditor.tsx

@@ -2,8 +2,7 @@
 import React, { PureComponent } from 'react';
 
 // Components
-import UnitPicker from 'app/core/components/Select/UnitPicker';
-import { FormField, FormLabel, PanelOptionsGroup, Select } from '@grafana/ui';
+import { FormField, FormLabel, PanelOptionsGroup, Select, UnitPicker } from '@grafana/ui';
 
 // Types
 import { SingleStatValueOptions } from './types';