Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(web): change element wrapping core/EmptyState children #1462

Merged
merged 3 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions web/src/components/core/EmptyState.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// @ts-check

import React from "react";
import { EmptyState, EmptyStateHeader, EmptyStateBody, Flex } from "@patternfly/react-core";
import { EmptyState, EmptyStateHeader, EmptyStateBody, Stack } from "@patternfly/react-core";
import { Icon } from "~/components/layout";

/**
Expand Down Expand Up @@ -68,9 +68,7 @@ export default function EmptyStateWrapper({
icon={<Icon name={icon} size="xxl" color={color} />}
/>
<EmptyStateBody>
<Flex rowGap={{ default: "rowGapMd" }} justifyContent={{ default: "justifyContentCenter" }}>
{children}
</Flex>
<Stack hasGutter>{children}</Stack>
</EmptyStateBody>
</EmptyState>
);
Expand Down
36 changes: 17 additions & 19 deletions web/src/components/core/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,25 @@ user privileges.",
{rootExplanationStart} <b>{rootUser}</b> {rootExplanationEnd}
</p>
<p>{_("Please, provide its password to log in to the system.")}</p>
<Stack hasGutter>
<Form id="login" onSubmit={login} aria-label={_("Login form")}>
<FormGroup fieldId="password">
<PasswordInput
id="password"
name="password"
value={password}
aria-label={_("Password input")}
onChange={(_, v) => setPassword(v)}
/>
</FormGroup>
<Form id="login" onSubmit={login} aria-label={_("Login form")}>
<FormGroup fieldId="password">
<PasswordInput
id="password"
name="password"
value={password}
aria-label={_("Password input")}
onChange={(_, v) => setPassword(v)}
/>
</FormGroup>

{error && <FormValidationError message={errorMessage(loginError)} />}
{error && <FormValidationError message={errorMessage(loginError)} />}

<ActionGroup>
<Button type="submit" variant="primary">
{_("Log in")}
</Button>
</ActionGroup>
</Form>
</Stack>
<ActionGroup>
<Button type="submit" variant="primary">
{_("Log in")}
</Button>
</ActionGroup>
</Form>
</EmptyState>
<Flex>
<FlexItem align={{ default: "alignRight" }}>
Expand Down
Loading