Skip to content

Commit a06a803

Browse files
committed
Added output to example in readme
1 parent cba8ab2 commit a06a803

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ const rows = [
2121
role: <a href="https://en.wikipedia.org/wiki/Vito_Corleone">Vito Corleone</a>,
2222
image: <img src="https://upload.wikimedia.org/wikipedia/en/2/21/Godfather15_flip.jpg" alt="Vito Corleone" />
2323
},
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+
},
2429
];
2530

2631
const keyGetter = row => row.name;
@@ -34,6 +39,69 @@ const keyGetter = row => row.name;
3439
/>
3540
```
3641

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+
37105
[See online](https://jorrit.github.io/react-hyper-responsive-table/)
38106

39107
## Properties

0 commit comments

Comments
 (0)