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

Update empty state styling #2895

Merged
merged 3 commits into from
Jul 10, 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
8 changes: 4 additions & 4 deletions src/components/FavoriteServices/EmptyState.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@import "~@redhat-cloud-services/frontend-components-utilities/styles/_all";
@import '~@patternfly/patternfly/patternfly-addons.scss';

.chr-l-stack__item-centered, .chr-c-card-centered {
display: flex;
justify-content: center;
text-align: center;
.chrome-favoriteServices {
.pf-v5-l-flex {
height: 100%;
}
}
43 changes: 24 additions & 19 deletions src/components/FavoriteServices/EmptyState.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button } from '@patternfly/react-core/dist/dynamic/components/Button';
import { StackItem } from '@patternfly/react-core/dist/dynamic/layouts/Stack';
import { Flex } from '@patternfly/react-core/dist/dynamic/layouts/Flex';
import { Stack, StackItem } from '@patternfly/react-core/dist/dynamic/layouts/Stack';
import { Text, TextContent } from '@patternfly/react-core/dist/dynamic/components/Text';

import React from 'react';
Expand All @@ -9,24 +10,28 @@ import './EmptyState.scss';

const EmptyState = () => (
<>
<StackItem className="chr-l-stack__item-centered pf-v5-u-mt-xl">
<img src="https://console.redhat.com/apps/frontend-assets/favoritedservices/favoriting-emptystate.svg" alt="favoriting image" />
</StackItem>
<StackItem className="chr-l-stack__item-centered pf-v5-u-mt-md">
<TextContent>
<Text component="h3" className="pf-v5-m-center">
No favorited services
</Text>
<Text component="small" className="pf-v5-u-mt-sm">
Add a service to your favorites to get started here.
</Text>
</TextContent>
</StackItem>
<StackItem className="chr-l-stack__item-centered pf-v5-u-mt-md">
<Button variant="primary" alt="View all services" component={(props) => <ChromeLink {...props} href="/allservices" />}>
View all services
</Button>
</StackItem>
<Flex className="pf-v5-u-justify-content-center pf-v5-u-align-items-stretch">
<Stack className="pf-v5-u-justify-content-center">
<StackItem className="pf-v5-u-text-align-center">
<img src="https://console.redhat.com/apps/frontend-assets/favoritedservices/favoriting-emptystate.svg" alt="favoriting image" />
</StackItem>
<StackItem className="pf-v5-u-text-align-center">
<TextContent>
<Text component="h3" className="pf-v5-m-center">
No favorited services
</Text>
<Text component="small" className="pf-v5-u-mt-sm">
Add a service to your favorites to get started here.
</Text>
</TextContent>
</StackItem>
<StackItem className="pf-v5-u-text-align-center pf-v5-u-mt-md">
<Button variant="primary" alt="View all services" component={(props) => <ChromeLink {...props} href="/allservices" />}>
View all services
</Button>
</StackItem>
</Stack>
</Flex>
</>
);

Expand Down
Loading