Chore: Replace `HorizontalGroup` with `Stack` in `SelectOrgPage` and `ChangePasswordForm` (#86061)

pull/80505/head^2
Joao Silva 1 year ago committed by GitHub
parent 6417e92ebe
commit 10c6ab5a17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      .betterer.results
  2. 6
      public/app/features/org/SelectOrgPage.tsx
  3. 6
      public/app/features/profile/ChangePasswordForm.tsx

@ -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>
</>
);
}}

Loading…
Cancel
Save