Chore: Replace HorizontalGroup with Stack in SelectOrgPage and ChangePasswordForm (#86061)
This commit is contained in:
@@ -3806,9 +3806,6 @@ exports[`better eslint`] = {
|
||||
"public/app/features/org/OrgDetailsPage.tsx:5381": [
|
||||
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
|
||||
],
|
||||
"public/app/features/org/SelectOrgPage.tsx:5381": [
|
||||
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
|
||||
],
|
||||
"public/app/features/org/state/actions.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
@@ -3969,9 +3966,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"]
|
||||
],
|
||||
"public/app/features/profile/ChangePasswordForm.tsx:5381": [
|
||||
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
|
||||
],
|
||||
"public/app/features/profile/UserProfileEditPage.tsx:5381": [
|
||||
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
|
||||
],
|
||||
|
||||
@@ -3,7 +3,7 @@ import { connect, ConnectedProps } from 'react-redux';
|
||||
import { useEffectOnce } from 'react-use';
|
||||
|
||||
import { config } from '@grafana/runtime';
|
||||
import { Button, HorizontalGroup } from '@grafana/ui';
|
||||
import { Button, Stack } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { StoreState, UserOrg } from 'app/types';
|
||||
|
||||
@@ -53,14 +53,14 @@ export const SelectOrgPage = ({ setUserOrganization, getUserOrganizations, userO
|
||||
You have been invited to another organization! Please select which organization that you want to use right
|
||||
now. You can change this later at any time.
|
||||
</p>
|
||||
<HorizontalGroup wrap>
|
||||
<Stack wrap="wrap">
|
||||
{userOrgs &&
|
||||
userOrgs.map((org) => (
|
||||
<Button key={org.orgId} icon="signin" onClick={() => setUserOrg(org)}>
|
||||
{org.name}
|
||||
</Button>
|
||||
))}
|
||||
</HorizontalGroup>
|
||||
</Stack>
|
||||
</div>
|
||||
</Page.Contents>
|
||||
</Page>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { Button, Field, HorizontalGroup, LinkButton } from '@grafana/ui';
|
||||
import { Button, Field, LinkButton, Stack } from '@grafana/ui';
|
||||
import { Form } from 'app/core/components/Form/Form';
|
||||
import {
|
||||
ValidationLabels,
|
||||
@@ -118,14 +118,14 @@ export const ChangePasswordForm = ({ user, onChangePassword, isSaving }: Props)
|
||||
})}
|
||||
/>
|
||||
</Field>
|
||||
<HorizontalGroup>
|
||||
<Stack>
|
||||
<Button variant="primary" disabled={isSaving} type="submit">
|
||||
<Trans i18nKey="profile.change-password.change-password-button">Change Password</Trans>
|
||||
</Button>
|
||||
<LinkButton variant="secondary" href={`${config.appSubUrl}/profile`} fill="outline">
|
||||
<Trans i18nKey="profile.change-password.cancel-button">Cancel</Trans>
|
||||
</LinkButton>
|
||||
</HorizontalGroup>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user