Forms: Remove Forms namespace [BREAKING] (#24378)

* Remove index and export

* Fix Forms import
This commit is contained in:
Tobias Skarhed 2020-05-07 21:41:26 +02:00 committed by GitHub
parent 62aa15f760
commit 5e50409000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 25 deletions

View File

@ -1,21 +0,0 @@
import { getFormStyles } from './getFormStyles';
import { Label } from './Label';
import { RadioButtonGroup } from './RadioButtonGroup/RadioButtonGroup';
import { Form } from './Form';
import { Field } from './Field';
import { Legend } from './Legend';
import { Checkbox } from './Checkbox';
import { InputControl } from '../InputControl';
const Forms = {
RadioButtonGroup,
getFormStyles,
Label,
Form,
Field,
InputControl,
Checkbox,
Legend,
};
export default Forms;

View File

@ -123,7 +123,6 @@ export { SelectValueEditor } from './OptionsUI/select';
export { FieldConfigItemHeaderTitle } from './FieldConfigs/FieldConfigItemHeaderTitle';
// Next-gen forms
export { default as Forms } from './Forms';
export { Form } from './Forms/Form';
export { InputControl } from './InputControl';
export * from './Button';

View File

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
import { dateTimeFormat } from '@grafana/data';
import { Forms, Form } from '@grafana/ui';
import { Legend, Form } from '@grafana/ui';
import { connect, MapDispatchToProps, MapStateToProps } from 'react-redux';
import { ImportDashboardForm } from './ImportDashboardForm';
import { clearLoadedDashboard, saveDashboard } from '../state/actions';
@ -54,7 +54,7 @@ class ImportDashboardOverviewUnConnected extends PureComponent<Props, State> {
{source === DashboardSource.Gcom && (
<div style={{ marginBottom: '24px' }}>
<div>
<Forms.Legend>
<Legend>
Importing Dashboard from{' '}
<a
href={`https://grafana.com/dashboards/${dashboard.gnetId}`}
@ -63,7 +63,7 @@ class ImportDashboardOverviewUnConnected extends PureComponent<Props, State> {
>
Grafana.com
</a>
</Forms.Legend>
</Legend>
</div>
<table className="filter-table form-inline">
<tbody>