@@ -21,6 +21,11 @@ const rows = [
21
21
role: < a href= " https://en.wikipedia.org/wiki/Vito_Corleone" > Vito Corleone< / a> ,
22
22
image: < img src= " https://upload.wikimedia.org/wikipedia/en/2/21/Godfather15_flip.jpg" alt= " Vito Corleone" / >
23
23
},
24
+ {
25
+ image: < img src= " https://upload.wikimedia.org/wikipedia/en/d/df/Michaelcoreleone.jpg" alt= " Al Pacino" / > ,
26
+ name: ' Al Pacino' ,
27
+ role: < a href= " https://en.wikipedia.org/wiki/Michael_Corleone" > Michael Corleone< / a> ,
28
+ },
24
29
];
25
30
26
31
const keyGetter = row => row .name ;
@@ -34,6 +39,69 @@ const keyGetter = row => row.name;
34
39
/ >
35
40
```
36
41
42
+ Output in wide mode:
43
+
44
+ ``` html
45
+ <table class =" widetable" >
46
+ <thead >
47
+ <tr >
48
+ <th scope =" col" ></th >
49
+ <th scope =" col" >Name</th >
50
+ <th scope =" col" >Role</th >
51
+ </tr >
52
+ </thead >
53
+ <tbody >
54
+ <tr >
55
+ <td ><img src =" https://upload.wikimedia.org/wikipedia/en/2/21/Godfather15_flip.jpg" alt =" Vito Corleone" ></td >
56
+ <td >Marlon Brando</td >
57
+ <td ><a href =" https://en.wikipedia.org/wiki/Vito_Corleone" >Vito Corleone</a ></td >
58
+ </tr >
59
+ <tr >
60
+ <td ><img src =" https://upload.wikimedia.org/wikipedia/en/d/df/Michaelcoreleone.jpg" alt =" Al Pacino" ></td >
61
+ <td >Al Pacino</td >
62
+ <td ><a href =" https://en.wikipedia.org/wiki/Michael_Corleone" >Michael Corleone</a ></td >
63
+ </tr >
64
+ </tbody >
65
+ </table >
66
+ ```
67
+
68
+ Output in narrow mode:
69
+
70
+ Note that each data row is now a ` <tbody> ` with multiple rows.
71
+
72
+ ``` html
73
+ <table class =" narrowtable" >
74
+ <tbody >
75
+ <tr >
76
+ <th scope =" row" ></th >
77
+ <td ><img src =" https://upload.wikimedia.org/wikipedia/en/2/21/Godfather15_flip.jpg" alt =" Vito Corleone" ></td >
78
+ </tr >
79
+ <tr >
80
+ <th scope =" row" >Name</th >
81
+ <td >Marlon Brando</td >
82
+ </tr >
83
+ <tr >
84
+ <th scope =" row" >Role</th >
85
+ <td ><a href =" https://en.wikipedia.org/wiki/Vito_Corleone" >Vito Corleone</a ></td >
86
+ </tr >
87
+ </tbody >
88
+ <tbody >
89
+ <tr >
90
+ <th scope =" row" ></th >
91
+ <td ><img src =" https://upload.wikimedia.org/wikipedia/en/d/df/Michaelcoreleone.jpg" alt =" Al Pacino" ></td >
92
+ </tr >
93
+ <tr >
94
+ <th scope =" row" >Name</th >
95
+ <td >Al Pacino</td >
96
+ </tr >
97
+ <tr >
98
+ <th scope =" row" >Role</th >
99
+ <td ><a href =" https://en.wikipedia.org/wiki/Michael_Corleone" >Michael Corleone</a ></td >
100
+ </tr >
101
+ </tbody >
102
+ </table >
103
+ ```
104
+
37
105
[ See online] ( https://jorrit.github.io/react-hyper-responsive-table/ )
38
106
39
107
## Properties
0 commit comments