| 1 |
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; |
| 2 |
import { Bullseye, EmptyState, EmptyStateVariant, EmptyStateBody, PageSection } from '@patternfly/react-core'; |
| 3 |
import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon'; |
| 4 |
import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper'; |
| 5 |
|
| 6 |
export const TableEmptyStateError: React.FunctionComponent = () => ( |
| 7 |
<DashboardWrapper hasPageTemplateTitle> |
| 8 |
<PageSection padding={{ default: 'noPadding', xl: 'padding' }} aria-label="Empty state table with error"> |
| 9 |
<Table aria-label="Loading table demo"> |
| 10 |
<Thead> |
| 11 |
<Tr> |
| 12 |
<Th>Repositories</Th> |
| 13 |
<Th>Branches</Th> |
| 14 |
<Th>Pull requests</Th> |
| 15 |
<Th>Workspaces</Th> |
| 16 |
<Th>Last commit</Th> |
| 17 |
</Tr> |
| 18 |
</Thead> |
| 19 |
<Tbody> |
| 20 |
<Tr> |
| 21 |
<Td colSpan={8}> |
| 22 |
<Bullseye> |
| 23 |
<EmptyState |
| 24 |
icon={RhUiErrorFillIcon} |
| 25 |
titleText="Unable to connect" |
| 26 |
headingLevel="h2" |
| 27 |
variant={EmptyStateVariant.sm} |
| 28 |
> |
| 29 |
<EmptyStateBody> |
| 30 |
There was an error retrieving data. Check your connection and reload the page. |
| 31 |
</EmptyStateBody> |
| 32 |
</EmptyState> |
| 33 |
</Bullseye> |
| 34 |
</Td> |
| 35 |
</Tr> |
| 36 |
</Tbody> |
| 37 |
</Table> |
| 38 |
</PageSection> |
| 39 |
</DashboardWrapper> |
| 40 |
); |