Debian Codegraph @

node/@patternfly/react-table/src/demos/examples/TableEmptyStateDefault.tsx

raw
1 import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
2 import {
3 Bullseye,
4 Button,
5 EmptyState,
6 EmptyStateVariant,
7 EmptyStateBody,
8 EmptyStateFooter,
9 EmptyStateActions,
10 PageSection
11 } from '@patternfly/react-core';
12 import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
13 import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
14
15 export const TableEmptyStateDefault: React.FunctionComponent = () => (
16 <DashboardWrapper hasPageTemplateTitle>
17 <PageSection padding={{ default: 'noPadding', xl: 'padding' }} aria-label="Empty state table data">
18 <Table aria-label="Empty state table">
19 <Thead>
20 <Tr>
21 <Th>Repositories</Th>
22 <Th>Branches</Th>
23 <Th>Pull requests</Th>
24 <Th>Workspaces</Th>
25 <Th>Last commit</Th>
26 </Tr>
27 </Thead>
28 <Tbody>
29 <Tr>
30 <Td colSpan={8}>
31 <Bullseye>
32 <EmptyState
33 titleText="No results found"
34 icon={SearchIcon}
35 headingLevel="h2"
36 variant={EmptyStateVariant.sm}
37 >
38 <EmptyStateBody>
39 No results match this filter criteria. Clear all filters and try again.
40 </EmptyStateBody>
41 <EmptyStateFooter>
42 <EmptyStateActions>
43 <Button variant="link">Clear all filters</Button>
44 </EmptyStateActions>
45 </EmptyStateFooter>
46 </EmptyState>
47 </Bullseye>
48 </Td>
49 </Tr>
50 </Tbody>
51 </Table>
52 </PageSection>
53 </DashboardWrapper>
54 );