import { Trans, t } from '@lingui/macro'; import React, { FC } from 'react'; import { selectors } from '@grafana/e2e-selectors'; import { Button, Field, FieldSet, Form, Icon, Input, Tooltip } from '@grafana/ui'; import config from 'app/core/config'; import { UserDTO } from 'app/types'; import { ProfileUpdateFields } from './types'; export interface Props { user: UserDTO | null; isSavingUser: boolean; updateProfile: (payload: ProfileUpdateFields) => void; } const { disableLoginForm } = config; export const UserProfileEditForm: FC = ({ user, isSavingUser, updateProfile }) => { const onSubmitProfileUpdate = (data: ProfileUpdateFields) => { updateProfile(data); }; return (
{({ register, errors }) => { return (
Edit profile}> Name is required} disabled={disableLoginForm} > } /> Email is required} disabled={disableLoginForm} > } /> } />
); }}
); }; export default UserProfileEditForm; const InputSuffix: FC = () => { return disableLoginForm ? ( ) : null; };