Skip to content

Commit

Permalink
chore(EmptyState): updated to use props instead of header/icon compon…
Browse files Browse the repository at this point in the history
…ents (#4025)
  • Loading branch information
thatblindgeye authored May 21, 2024
1 parent b1498f6 commit 61c81c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import {
ToolbarContent,
ToolbarItem,
EmptyState,
EmptyStateHeader,
EmptyStateIcon,
EmptyStateBody,
Spinner
} from '@patternfly/react-core';
Expand Down Expand Up @@ -194,8 +192,7 @@ export const IconRecommendations = () => {
</Tbody>
</Table>
{filteredRows.length === 0 && (
<EmptyState>
<EmptyStateHeader titleText={`No results found for "${ searchValue }"`} headingLevel="h5" icon={<EmptyStateIcon icon={SearchIcon} />} />
<EmptyState titleText={`No results found for "${ searchValue }"`} headingLevel="h5" icon={SearchIcon}>
<EmptyStateBody>
We couldn't find any icons that matched your search. Try entering a new search term to find what you're looking for.
</EmptyStateBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import {
ToolbarContent,
ToolbarItem,
EmptyState,
EmptyStateHeader,
EmptyStateIcon,
EmptyStateBody,
Tooltip,
TooltipPosition
Expand Down Expand Up @@ -190,8 +188,7 @@ export const IconsTable = () => {
</Table>

{filteredRows.length === 0 && (
<EmptyState>
<EmptyStateHeader titleText={`No results found for "${ searchValue }"`} headingLevel="h4" icon={<EmptyStateIcon icon={SearchIcon} />} />
<EmptyState titleText={`No results found for "${ searchValue }"`} headingLevel="h4" icon={SearchIcon}>
<EmptyStateBody>We couldn't find any icons that matched your search. If none of the icons listed fit
your use case, you may use any additional 'fa' icons within <a href="https://fontawesome.com/icons?d=gallery&amp;m=free">Font Awesome's free set</a>.
</EmptyStateBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ import {
TextListItem,
Bullseye,
EmptyState,
EmptyStateHeader,
EmptyStateFooter,
EmptyStateBody,
EmptyStateActions,
EmptyStateIcon,
Button,
} from "@patternfly/react-core";
import {
Expand Down Expand Up @@ -345,12 +343,8 @@ export const ReleaseNotesTable = () => {
<Tr>
<Td colSpan={6}>
<Bullseye>
<EmptyState variant="sm">
<EmptyStateHeader
icon={<EmptyStateIcon icon={SearchIcon} />}
titleText="No results found"
headingLevel="h2"
/>
<EmptyState variant="sm" titleText="No results found"
headingLevel="h2" icon={SearchIcon}>
<EmptyStateBody>
Clear search input and filters and try again.
</EmptyStateBody>
Expand Down

0 comments on commit 61c81c9

Please sign in to comment.