Skip to content

Commit

Permalink
Wrap EmptyStatePanel in a Card for consistency
Browse files Browse the repository at this point in the history
This fixes two issues, the "No such file or directory" view now shows
the EmptyStatePanel properly centered and with the expected background
colour. (The same background colour as the normal folder view.

Closes: #568
  • Loading branch information
jelly authored and martinpitt committed Jun 21, 2024
1 parent a1023fe commit ad19eb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import React, { useContext, useEffect, useMemo, useState } from "react";
import {
AlertGroup, Alert, AlertVariant, AlertActionCloseButton
} from "@patternfly/react-core/dist/esm/components/Alert";
import { Card } from "@patternfly/react-core/dist/esm/components/Card";
import { Page, PageSection } from "@patternfly/react-core/dist/esm/components/Page";
import { Sidebar, SidebarPanel, SidebarContent } from "@patternfly/react-core/dist/esm/components/Sidebar";
import { ExclamationCircleIcon } from "@patternfly/react-icons";
Expand Down Expand Up @@ -166,10 +167,12 @@ export const Application = () => {
<Sidebar isPanelRight hasGutter>
<SidebarContent>
{errorMessage &&
<EmptyStatePanel
paragraph={errorMessage}
icon={ExclamationCircleIcon}
/>}
<Card>
<EmptyStatePanel
paragraph={errorMessage}
icon={ExclamationCircleIcon}
/>
</Card>}
{!errorMessage &&
<FilesFolderView
path={path}
Expand Down

0 comments on commit ad19eb7

Please sign in to comment.