mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 08:12:08 +08:00
Chore: Replace deprecated Form imports (#84537)
* SignupInvited: replace Form * Chore: replace Form import * Chore: replace HorizontalGroup * Replace the component in OrgProfile
This commit is contained in:
@ -2,7 +2,8 @@ import React, { useState } from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
import { Button, Field, Form, Input } from '@grafana/ui';
|
||||
import { Button, Field, Input } from '@grafana/ui';
|
||||
import { Form } from 'app/core/components/Form/Form';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { getConfig } from 'app/core/config';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import { Input, Field, FieldSet, Button, Form } from '@grafana/ui';
|
||||
import { Input, Field, FieldSet, Button } from '@grafana/ui';
|
||||
import { Form } from 'app/core/components/Form/Form';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { Button, Field, FieldSet, Form, Icon, Input, Tooltip } from '@grafana/ui';
|
||||
import { Button, Field, FieldSet, Icon, Input, Tooltip } from '@grafana/ui';
|
||||
import { Form } from 'app/core/components/Form/Form';
|
||||
import config from 'app/core/config';
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
import { UserDTO } from 'app/types';
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import { getBackendSrv, locationService } from '@grafana/runtime';
|
||||
import { Form, Button, Input, Field, FieldSet } from '@grafana/ui';
|
||||
import { Button, Input, Field, FieldSet } from '@grafana/ui';
|
||||
import { Form } from 'app/core/components/Form/Form';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { UserRolePicker } from 'app/core/components/RolePicker/UserRolePicker';
|
||||
import { fetchRoleOptions, updateUserRoles } from 'app/core/components/RolePicker/api';
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
import { SubmitHandler, Validate } from 'react-hook-form';
|
||||
|
||||
import { Button, Field, Form, Input, Modal } from '@grafana/ui';
|
||||
import { Button, Field, Input, Modal } from '@grafana/ui';
|
||||
import { Form } from 'app/core/components/Form/Form';
|
||||
|
||||
type FormModel = { folderName: string };
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { connect, ConnectedProps } from 'react-redux';
|
||||
|
||||
import { Form, Button, Field, Checkbox, LinkButton, HorizontalGroup, Alert } from '@grafana/ui';
|
||||
import { Button, Field, Checkbox, LinkButton, Stack, Alert } from '@grafana/ui';
|
||||
import { Form } from 'app/core/components/Form/Form';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { StoreState } from 'app/types';
|
||||
|
||||
@ -60,7 +61,7 @@ export const SupportBundlesCreateUnconnected = ({
|
||||
{createBundleError && <Alert title={createBundleError} severity="error" />}
|
||||
{!!collectors.length && (
|
||||
<Form defaultValues={values} onSubmit={onSubmit} validateOn="onSubmit">
|
||||
{({ register, errors }) => {
|
||||
{({ register }) => {
|
||||
return (
|
||||
<>
|
||||
{[...collectors]
|
||||
@ -79,12 +80,12 @@ export const SupportBundlesCreateUnconnected = ({
|
||||
</Field>
|
||||
);
|
||||
})}
|
||||
<HorizontalGroup>
|
||||
<Stack>
|
||||
<Button type="submit">Create</Button>
|
||||
<LinkButton href="/support-bundles" variant="secondary">
|
||||
Cancel
|
||||
</LinkButton>
|
||||
</HorizontalGroup>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}}
|
||||
|
Reference in New Issue
Block a user