Selaa lähdekoodia

fixing imports, minor fix on mapping row

Peter Holmberg 7 vuotta sitten
vanhempi
commit
83fbf52aac

+ 1 - 1
packages/grafana-ui/src/components/FormGroup/FormGroup.tsx

@@ -1,7 +1,7 @@
 import React, { SFC } from 'react';
 import { Label } from '..';
 
-interface Props {
+export interface Props {
   label: string;
   inputProps: {};
   labelWidth?: number;

+ 1 - 1
packages/grafana-ui/src/components/Label/Label.tsx

@@ -1,5 +1,5 @@
 import React, { SFC, ReactNode } from 'react';
-import { Tooltip } from '@grafana/ui';
+import { Tooltip } from '..';
 
 interface Props {
   tooltip?: string;

+ 1 - 2
public/app/core/components/SharedPreferences/SharedPreferences.tsx

@@ -1,7 +1,6 @@
 import React, { PureComponent } from 'react';
 
-import { Label } from '../../../../../packages/grafana-ui/src/components/Label/Label';
-import { Select } from '@grafana/ui';
+import { Label, Select } from '@grafana/ui';
 import { getBackendSrv, BackendSrv } from 'app/core/services/backend_srv';
 
 import { DashboardSearchHit } from 'app/types';

+ 1 - 1
public/app/features/datasources/settings/BasicSettings.tsx

@@ -1,5 +1,5 @@
 import React, { SFC } from 'react';
-import { Label } from '../../../../../packages/grafana-ui/src/components/Label/Label';
+import { Label } from '@grafana/ui';
 import { Switch } from '../../../core/components/Switch/Switch';
 
 export interface Props {

+ 1 - 1
public/app/features/teams/TeamSettings.tsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { connect } from 'react-redux';
 
-import { Label } from '../../../../packages/grafana-ui/src/components/Label/Label';
+import { Label } from '@grafana/ui';
 import { SharedPreferences } from 'app/core/components/SharedPreferences/SharedPreferences';
 import { updateTeam } from './state/actions';
 import { getRouteParamsId } from 'app/core/selectors/location';

+ 9 - 10
public/app/plugins/panel/gauge/MappingRow.tsx

@@ -81,16 +81,15 @@ export default class MappingRow extends PureComponent<Props, State> {
             }}
             inputWidth={8}
           />
-          <FormGroup
-            label="Text"
-            labelWidth={4}
-            inputProps={{
-              onBlur: () => this.updateMapping,
-              onChange: event => this.onMappingTextChange(event),
-              value: text,
-            }}
-            inputWidth={10}
-          />
+          <div className="gf-form gf-form--grow">
+            <Label width={4}>Text</Label>
+            <input
+              className="gf-form-input"
+              onBlur={this.updateMapping}
+              value={text}
+              onChange={this.onMappingTextChange}
+            />
+          </div>
         </>
       );
     }