@@ -25,7 +25,6 @@ TextContent,
25
25
Text,
26
26
Divider } from '@patternfly/react-core ';
27
27
import { Table as TableDeprecated, TableHeader, TableBody } from '@patternfly/react-table /deprecated';
28
-
29
28
import CheckIcon from '@patternfly/react-icons /dist/esm/icons/check-icon';
30
29
import CloneIcon from '@patternfly/react-icons /dist/esm/icons/clone-icon';
31
30
import CodeIcon from '@patternfly/react-icons /dist/esm/icons/code-icon';
@@ -49,37 +48,36 @@ import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
49
48
import AttentionBellIcon from '@patternfly/react-icons /dist/esm/icons/attention-bell-icon';
50
49
import BlueprintIcon from '@patternfly/react-icons /dist/esm/icons/blueprint-icon';
51
50
import EllipsisVIcon from '@patternfly/react-icons /dist/esm/icons/ellipsis-v-icon';
52
- import { rows, columns } from '@ patternfly/react-table /src/docs/demos/table-demos /sampleData';
51
+ import { rows, columns } from '. /sampleData';
53
52
54
53
## Demos
55
54
56
55
### Bulk select
57
56
58
- ``` js isFullscreen file="./table-demos/BulkSelect.jsx"
59
-
57
+ ``` js isFullscreen file="./examples/BulkSelect.tsx"
60
58
```
61
59
62
60
### Expand/collapse all
63
61
64
- ``` js isFullscreen file="./table-demos /ExpandCollapseAll.jsx "
62
+ ``` js isFullscreen file="./examples /ExpandCollapseAll.tsx "
65
63
66
64
```
67
65
68
66
### Compact
69
67
70
- ``` js isFullscreen file="./table-demos /Compact.jsx "
68
+ ``` js isFullscreen file="./examples /Compact.tsx "
71
69
72
70
```
73
71
74
72
### Compound expansion
75
73
76
- ``` js isFullscreen file="./table-demos /CompoundExpansion.jsx "
74
+ ``` js isFullscreen file="./examples /CompoundExpansion.tsx "
77
75
78
76
```
79
77
80
78
### Column management
81
79
82
- ``` js isFullscreen file="./table-demos /ColumnManagement.jsx "
80
+ ``` js isFullscreen file="./examples /ColumnManagement.tsx "
83
81
84
82
```
85
83
@@ -855,7 +853,7 @@ import {
855
853
import SearchIcon from ' @patternfly/react-icons/dist/esm/icons/search-icon' ;
856
854
import FilterIcon from ' @patternfly/react-icons/dist/esm/icons/filter-icon' ;
857
855
import { Table , TableText , Thead , Tr , Th , Tbody , Td } from ' @patternfly/react-table' ;
858
- import { rows , columns } from ' @patternfly/react-table/src/docs/demos/table-demos /sampleData' ;
856
+ import { rows , columns } from ' . /sampleData' ;
859
857
860
858
class FilterTableDemo extends React .Component {
861
859
constructor (props ) {
@@ -1297,7 +1295,7 @@ class FilterTableDemo extends React.Component {
1297
1295
1298
1296
### Sortable - responsive
1299
1297
1300
- ``` js isFullscreen file="./table-demos /SortableResponsive.jsx "
1298
+ ``` js isFullscreen file="./examples /SortableResponsive.tsx "
1301
1299
1302
1300
```
1303
1301
@@ -1420,27 +1418,27 @@ class ComplexPaginationTableDemo extends React.Component {
1420
1418
1421
1419
### Static bottom pagination on mobile
1422
1420
1423
- ``` js isFullscreen file="table-demos/ StaticBottomPagination.jsx "
1421
+ ``` ts isFullscreen file="./examples/ StaticBottomPagination.tsx "
1424
1422
1425
1423
```
1426
1424
1427
1425
### Sticky header
1428
1426
1429
- ``` js isFullscreen file="./table-demos /StickyHeader.jsx "
1427
+ ``` js isFullscreen file="./examples /StickyHeader.tsx "
1430
1428
1431
1429
```
1432
1430
1433
1431
### Sticky first column
1434
1432
1435
- ``` js isFullscreen file="./table-demos /StickyFirstColumn.jsx "
1433
+ ``` js isFullscreen file="./examples /StickyFirstColumn.tsx "
1436
1434
1437
1435
```
1438
1436
1439
1437
### Sticky columns and header with toolbar
1440
1438
1441
1439
A toolbar may be added above a sticky table either inside or outside the ` OuterScrollContainer ` .
1442
1440
1443
- ``` ts isFullscreen file="../ ../components/Table/examples/TableStickyColumnsAndHeader.tsx"
1441
+ ``` js isFullscreen file="../components/Table/examples/TableStickyColumnsAndHeader.tsx"
1444
1442
1445
1443
```
1446
1444
@@ -1450,172 +1448,15 @@ These examples demonstrate the use of an [Empty State component](/components/emp
1450
1448
1451
1449
### Empty
1452
1450
1453
- ``` js isFullscreen
1454
- import React from ' react' ;
1455
- import { Table , Thead , Tr , Th , Tbody , Td } from ' @patternfly/react-table' ;
1456
- import {
1457
- Bullseye ,
1458
- Button ,
1459
- Card ,
1460
- EmptyState ,
1461
- EmptyStateVariant ,
1462
- EmptyStateIcon ,
1463
- EmptyStateBody ,
1464
- EmptyStateHeader ,
1465
- EmptyStateFooter ,
1466
- EmptyStateActions ,
1467
- PageSection
1468
- } from ' @patternfly/react-core' ;
1469
- import SearchIcon from ' @patternfly/react-icons/dist/esm/icons/search-icon' ;
1470
- import { DashboardWrapper } from ' @patternfly/react-core/src/demos/DashboardWrapper' ;
1471
-
1472
- export const TableEmptyState: React .FunctionComponent = () => (
1473
- < DashboardWrapper hasPageTemplateTitle>
1474
- < PageSection padding= {{ default: ' noPadding' , xl: ' padding' }}>
1475
- < Card component= " div" >
1476
- < Table aria- label= " Empty state table" >
1477
- < Thead>
1478
- < Tr>
1479
- < Th> Repositories< / Th>
1480
- < Th> Branches< / Th>
1481
- < Th> Pull requests< / Th>
1482
- < Th> Workspaces< / Th>
1483
- < Th> Last commit< / Th>
1484
- < / Tr>
1485
- < / Thead>
1486
- < Tbody>
1487
- < Tr>
1488
- < Td colSpan= {8 }>
1489
- < Bullseye>
1490
- < EmptyState variant= {EmptyStateVariant .sm }>
1491
- < EmptyStateHeader
1492
- icon= {< EmptyStateIcon icon= {SearchIcon} / > }
1493
- titleText= " No results found"
1494
- headingLevel= " h2"
1495
- / >
1496
- < EmptyStateBody>
1497
- No results match this filter criteria . Clear all filters and try again.
1498
- < / EmptyStateBody>
1499
- < EmptyStateFooter>
1500
- < EmptyStateActions>
1501
- < Button variant= " link" > Clear all filters< / Button>
1502
- < / EmptyStateActions>
1503
- < / EmptyStateFooter>
1504
- < / EmptyState>
1505
- < / Bullseye>
1506
- < / Td>
1507
- < / Tr>
1508
- < / Tbody>
1509
- < / Table>
1510
- < / Card>
1511
- < / PageSection>
1512
- < / DashboardWrapper>
1513
- );
1451
+ ``` js isFullscreen file="./examples/EmptyStateDefault.tsx"
1514
1452
```
1515
1453
1516
1454
### Loading
1517
1455
1518
- ``` js isFullscreen
1519
- import React from ' react' ;
1520
- import { Table , Thead , Tr , Th , Tbody , Td } from ' @patternfly/react-table' ;
1521
- import {
1522
- Bullseye ,
1523
- Card ,
1524
- EmptyState ,
1525
- EmptyStateIcon ,
1526
- EmptyStateBody ,
1527
- EmptyStateHeader ,
1528
- PageSection ,
1529
- Spinner
1530
- } from ' @patternfly/react-core' ;
1531
- import { DashboardWrapper } from ' @patternfly/react-core/src/demos/DashboardWrapper' ;
1532
-
1533
- export const LoadingStateDemo: React .FunctionComponent = () => (
1534
- < DashboardWrapper hasPageTemplateTitle>
1535
- < PageSection padding= {{ default: ' noPadding' , xl: ' padding' }}>
1536
- < Card component= " div" >
1537
- < Table aria- label= " Loading table demo" >
1538
- < Thead>
1539
- < Tr>
1540
- < Th> Repositories< / Th>
1541
- < Th> Branches< / Th>
1542
- < Th> Pull requests< / Th>
1543
- < Th> Workspaces< / Th>
1544
- < Th> Last commit< / Th>
1545
- < / Tr>
1546
- < / Thead>
1547
- < Tbody>
1548
- < Tr>
1549
- < Td colSpan= {8 }>
1550
- < Bullseye>
1551
- < EmptyState>
1552
- < EmptyStateHeader titleText= " Loading" headingLevel= " h2" icon= {< EmptyStateIcon icon= {Spinner} / > } / >
1553
- < / EmptyState>
1554
- < / Bullseye>
1555
- < / Td>
1556
- < / Tr>
1557
- < / Tbody>
1558
- < / Table>
1559
- < / Card>
1560
- < / PageSection>
1561
- < / DashboardWrapper>
1562
- );
1456
+ ``` js isFullscreen file="./examples/EmptyStateLoading.tsx"
1563
1457
```
1564
1458
1565
1459
### Error
1566
1460
1567
- ``` js isFullscreen
1568
- import React from ' react' ;
1569
- import { Table , Thead , Tr , Th , Tbody , Td } from ' @patternfly/react-table' ;
1570
- import {
1571
- Bullseye ,
1572
- Card ,
1573
- EmptyState ,
1574
- EmptyStateVariant ,
1575
- EmptyStateIcon ,
1576
- EmptyStateBody ,
1577
- EmptyStateHeader ,
1578
- PageSection
1579
- } from ' @patternfly/react-core' ;
1580
- import ExclamationCircleIcon from ' @patternfly/react-icons/dist/esm/icons/exclamation-circle-icon' ;
1581
- import globalDangerColor200 from ' @patternfly/react-tokens/dist/esm/global_danger_color_200' ;
1582
- import { DashboardWrapper } from ' @patternfly/react-core/src/demos/DashboardWrapper' ;
1583
-
1584
- export const ErrorStateDemo: React .FunctionComponent = () => (
1585
- < DashboardWrapper hasPageTemplateTitle>
1586
- < PageSection padding= {{ default: ' noPadding' , xl: ' padding' }}>
1587
- < Card component= " div" >
1588
- < Table aria- label= " Loading table demo" >
1589
- < Thead>
1590
- < Tr>
1591
- < Th> Repositories< / Th>
1592
- < Th> Branches< / Th>
1593
- < Th> Pull requests< / Th>
1594
- < Th> Workspaces< / Th>
1595
- < Th> Last commit< / Th>
1596
- < / Tr>
1597
- < / Thead>
1598
- < Tbody>
1599
- < Tr>
1600
- < Td colSpan= {8 }>
1601
- < Bullseye>
1602
- < EmptyState variant= {EmptyStateVariant .sm }>
1603
- < EmptyStateHeader
1604
- titleText= " Unable to connect"
1605
- icon= {< EmptyStateIcon icon= {ExclamationCircleIcon} color= {globalDangerColor200 .value } / > }
1606
- headingLevel= " h2"
1607
- / >
1608
- < EmptyStateBody>
1609
- There was an error retrieving data . Check your connection and reload the page.
1610
- < / EmptyStateBody>
1611
- < / EmptyState>
1612
- < / Bullseye>
1613
- < / Td>
1614
- < / Tr>
1615
- < / Tbody>
1616
- < / Table>
1617
- < / Card>
1618
- < / PageSection>
1619
- < / DashboardWrapper>
1620
- );
1461
+ ``` js isFullscreen file="./examples/EmptyStateError.tsx"
1621
1462
```
0 commit comments