@ndla/ui 47.1.3 → 47.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/DefinitionList/DefinitionDescription.js +2 -2
- package/es/DefinitionList/DefinitionTerm.js +2 -2
- package/es/{Image/LazyLoadImage.js → ExpandableBox/ExpandableBox.js} +15 -32
- package/es/ExpandableBox/index.js +9 -0
- package/es/Footer/Footer.js +8 -8
- package/es/Footer/FooterLinks.js +6 -6
- package/es/Image/Image.js +5 -14
- package/es/LinkBlock/LinkBlock.js +6 -6
- package/es/Messages/MessageBox.js +22 -56
- package/es/Resource/storyComponents.js +67 -0
- package/es/index.js +1 -0
- package/es/locale/messages-en.js +15 -4
- package/es/locale/messages-nb.js +15 -4
- package/es/locale/messages-nn.js +15 -4
- package/es/locale/messages-se.js +13 -2
- package/es/locale/messages-sma.js +17 -6
- package/lib/DefinitionList/DefinitionDescription.js +1 -1
- package/lib/DefinitionList/DefinitionTerm.js +1 -1
- package/lib/ExpandableBox/ExpandableBox.d.ts +15 -0
- package/lib/{Image/LazyLoadImage.js → ExpandableBox/ExpandableBox.js} +18 -32
- package/lib/ExpandableBox/index.d.ts +8 -0
- package/lib/ExpandableBox/index.js +18 -0
- package/lib/Footer/Footer.d.ts +5 -9
- package/lib/Footer/Footer.js +8 -8
- package/lib/Footer/FooterLinks.d.ts +5 -9
- package/lib/Footer/FooterLinks.js +6 -6
- package/lib/Image/Image.js +5 -14
- package/lib/LinkBlock/LinkBlock.js +6 -6
- package/lib/Messages/MessageBox.d.ts +2 -2
- package/lib/Messages/MessageBox.js +21 -55
- package/lib/Resource/storyComponents.d.ts +12 -0
- package/lib/Resource/storyComponents.js +74 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +13 -0
- package/lib/locale/messages-en.d.ts +13 -2
- package/lib/locale/messages-en.js +15 -4
- package/lib/locale/messages-nb.d.ts +13 -2
- package/lib/locale/messages-nb.js +15 -4
- package/lib/locale/messages-nn.d.ts +13 -2
- package/lib/locale/messages-nn.js +15 -4
- package/lib/locale/messages-se.d.ts +13 -2
- package/lib/locale/messages-se.js +13 -2
- package/lib/locale/messages-sma.d.ts +13 -2
- package/lib/locale/messages-sma.js +17 -6
- package/package.json +18 -18
- package/src/Breadcrumb/Breadcrumb.stories.tsx +77 -0
- package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +57 -0
- package/src/ContentLoader/ContentLoader.stories.tsx +64 -0
- package/src/DefinitionList/DefinitionDescription.tsx +1 -2
- package/src/DefinitionList/DefinitionTerm.tsx +1 -2
- package/src/Embed/FootnoteEmbed.stories.tsx +134 -0
- package/src/ExpandableBox/ExpandableBox.stories.tsx +34 -0
- package/src/ExpandableBox/ExpandableBox.tsx +21 -0
- package/src/ExpandableBox/index.ts +9 -0
- package/src/FactBox/Factbox.stories.tsx +62 -0
- package/src/FileList/FileList.stories.tsx +48 -0
- package/src/Footer/Footer.stories.tsx +116 -0
- package/src/Footer/Footer.tsx +5 -9
- package/src/Footer/FooterLinks.tsx +5 -9
- package/src/Image/Image.stories.tsx +63 -0
- package/src/Image/Image.tsx +3 -17
- package/src/Image/__tests__/__snapshots__/Image-test.jsx.snap +19 -10
- package/src/LinkBlock/LinkBlock.tsx +1 -1
- package/src/List/OrderedList.stories.tsx +114 -0
- package/src/List/UnorderedList.stories.tsx +46 -0
- package/src/Messages/MessageBanner.stories.tsx +33 -0
- package/src/Messages/MessageBox.stories.tsx +97 -0
- package/src/Messages/MessageBox.tsx +28 -62
- package/src/MyNdla/Resource/Folder.stories.tsx +31 -4
- package/src/MyNdla/Resource/FolderInput.stories.tsx +29 -0
- package/src/Resource/BlockResource.stories.tsx +51 -5
- package/src/Resource/ListResource.stories.tsx +98 -0
- package/src/Resource/storyComponents.tsx +46 -0
- package/src/ResourceGroup/ResourceItem.stories.tsx +103 -0
- package/src/SnackBar/Snack.stories.tsx +91 -0
- package/src/Table/Table.stories.tsx +701 -0
- package/src/TreeStructure/TreeStructure.stories.tsx +271 -0
- package/src/index.ts +1 -0
- package/src/locale/messages-en.ts +12 -4
- package/src/locale/messages-nb.ts +15 -4
- package/src/locale/messages-nn.ts +15 -4
- package/src/locale/messages-se.ts +10 -2
- package/src/locale/messages-sma.ts +14 -6
- package/lib/Image/LazyLoadImage.d.ts +0 -17
- package/src/Image/LazyLoadImage.tsx +0 -37
- package/src/Resource/Resource.stories.tsx +0 -81
|
@@ -0,0 +1,701 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
10
|
+
import { defaultParameters } from '../../../../stories/defaults';
|
|
11
|
+
import Table from './Table';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Tabeller skal brukes til å presentere data (tabulære data), ikke til utforming. Det anbefales å holde tabellene så enkle som mulig. Ved mer kompleksitet kan data heller deles opp i flere tabeller.
|
|
15
|
+
*
|
|
16
|
+
* Tekstformatering, høyrestilling av tekst osv. angis ikke i tabellens stilsett, men gjøres i redaktørgrensesnittet.
|
|
17
|
+
*
|
|
18
|
+
* Titlene kan kuttes ut, plasseres som en topprad (thead), eller som første rad i en tabell (innenfor tbody). De vil bli stilet etter plassering.
|
|
19
|
+
*
|
|
20
|
+
* Dersom du bruker titler både på rader og kolonner må du definere i koden hvilken vei tittelen peker:
|
|
21
|
+
*
|
|
22
|
+
* `<th scope="row">`
|
|
23
|
+
*
|
|
24
|
+
* Tabeller kan ha en tilknyttet tittel ved bruk av elementet: `<caption>`
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
const meta: Meta = {
|
|
28
|
+
component: Table,
|
|
29
|
+
tags: ['autodocs'],
|
|
30
|
+
decorators: [
|
|
31
|
+
(Story) => (
|
|
32
|
+
<div style={{ padding: '24px' }}>
|
|
33
|
+
<Story />
|
|
34
|
+
</div>
|
|
35
|
+
),
|
|
36
|
+
],
|
|
37
|
+
title: 'Base styles/Tables',
|
|
38
|
+
parameters: defaultParameters,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default meta;
|
|
42
|
+
|
|
43
|
+
export const Tables: StoryFn = () => (
|
|
44
|
+
<Table>
|
|
45
|
+
<caption>Tabelltittel</caption>
|
|
46
|
+
<thead>
|
|
47
|
+
<tr>
|
|
48
|
+
<th>
|
|
49
|
+
10<sup>n</sup>
|
|
50
|
+
</th>
|
|
51
|
+
<th>Prefiks</th>
|
|
52
|
+
<th>Symbol</th>
|
|
53
|
+
<th>Namn</th>
|
|
54
|
+
<th>Eksempel</th>
|
|
55
|
+
</tr>
|
|
56
|
+
</thead>
|
|
57
|
+
<tbody>
|
|
58
|
+
<tr>
|
|
59
|
+
<td>
|
|
60
|
+
10<sup>12</sup>
|
|
61
|
+
</td>
|
|
62
|
+
<td>tera</td>
|
|
63
|
+
<td>T</td>
|
|
64
|
+
<td>billion</td>
|
|
65
|
+
<td>1000000000000</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td>
|
|
69
|
+
10<sup>9</sup>
|
|
70
|
+
</td>
|
|
71
|
+
<td>giga</td>
|
|
72
|
+
<td>G</td>
|
|
73
|
+
<td>milliard</td>
|
|
74
|
+
<td>1000000000</td>
|
|
75
|
+
</tr>
|
|
76
|
+
<tr>
|
|
77
|
+
<td>
|
|
78
|
+
10<sup>6</sup>
|
|
79
|
+
</td>
|
|
80
|
+
<td>mega</td>
|
|
81
|
+
<td>M</td>
|
|
82
|
+
<td>million</td>
|
|
83
|
+
<td>1000000</td>
|
|
84
|
+
</tr>
|
|
85
|
+
<tr>
|
|
86
|
+
<td>
|
|
87
|
+
10<sup>3</sup>
|
|
88
|
+
</td>
|
|
89
|
+
<td>kilo</td>
|
|
90
|
+
<td>k</td>
|
|
91
|
+
<td>tusen</td>
|
|
92
|
+
<td>1000</td>
|
|
93
|
+
</tr>
|
|
94
|
+
<tr>
|
|
95
|
+
<td>
|
|
96
|
+
10<sup>2</sup>
|
|
97
|
+
</td>
|
|
98
|
+
<td>hekto</td>
|
|
99
|
+
<td>h</td>
|
|
100
|
+
<td>hundre</td>
|
|
101
|
+
<td>100</td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td>
|
|
105
|
+
10<sup>1</sup>
|
|
106
|
+
</td>
|
|
107
|
+
<td>deka</td>
|
|
108
|
+
<td>da</td>
|
|
109
|
+
<td>ti</td>
|
|
110
|
+
<td>10</td>
|
|
111
|
+
</tr>
|
|
112
|
+
<tr>
|
|
113
|
+
<td>
|
|
114
|
+
10<sup>-1</sup>
|
|
115
|
+
</td>
|
|
116
|
+
<td>desi</td>
|
|
117
|
+
<td>d</td>
|
|
118
|
+
<td>tidel</td>
|
|
119
|
+
<td>0,1</td>
|
|
120
|
+
</tr>
|
|
121
|
+
<tr>
|
|
122
|
+
<td>
|
|
123
|
+
10<sup>-2</sup>
|
|
124
|
+
</td>
|
|
125
|
+
<td>centi</td>
|
|
126
|
+
<td>c</td>
|
|
127
|
+
<td>hundredel</td>
|
|
128
|
+
<td>0,01</td>
|
|
129
|
+
</tr>
|
|
130
|
+
<tr>
|
|
131
|
+
<td>
|
|
132
|
+
10<sup>-3</sup>
|
|
133
|
+
</td>
|
|
134
|
+
<td>milli</td>
|
|
135
|
+
<td>m</td>
|
|
136
|
+
<td>tusendel</td>
|
|
137
|
+
<td>0,001</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td>
|
|
141
|
+
10<sup>-6</sup>
|
|
142
|
+
</td>
|
|
143
|
+
<td>mikro</td>
|
|
144
|
+
<td />
|
|
145
|
+
<td>milliondel</td>
|
|
146
|
+
<td>0,000001</td>
|
|
147
|
+
</tr>
|
|
148
|
+
<tr>
|
|
149
|
+
<td>
|
|
150
|
+
10<sup>-9</sup>
|
|
151
|
+
</td>
|
|
152
|
+
<td>nano</td>
|
|
153
|
+
<td>n</td>
|
|
154
|
+
<td>milliarddel</td>
|
|
155
|
+
<td>
|
|
156
|
+
<p>0,000000001</p>
|
|
157
|
+
</td>
|
|
158
|
+
</tr>
|
|
159
|
+
</tbody>
|
|
160
|
+
</Table>
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
export const WithFormatting: StoryFn = () => (
|
|
164
|
+
<Table>
|
|
165
|
+
<thead>
|
|
166
|
+
<tr>
|
|
167
|
+
<th>
|
|
168
|
+
10<sup>n</sup>
|
|
169
|
+
</th>
|
|
170
|
+
<th>Prefiks</th>
|
|
171
|
+
<th>Symbol</th>
|
|
172
|
+
<th>Namn</th>
|
|
173
|
+
<th style={{ textAlign: 'right' }}>Eksempel</th>
|
|
174
|
+
</tr>
|
|
175
|
+
</thead>
|
|
176
|
+
<tbody>
|
|
177
|
+
<tr>
|
|
178
|
+
<td>
|
|
179
|
+
10<sup>15</sup>
|
|
180
|
+
</td>
|
|
181
|
+
<td>peta</td>
|
|
182
|
+
<td>P</td>
|
|
183
|
+
<td>billiard</td>
|
|
184
|
+
<td style={{ textAlign: 'right' }}>1000000000000000</td>
|
|
185
|
+
</tr>
|
|
186
|
+
<tr>
|
|
187
|
+
<td>
|
|
188
|
+
10<sup>12</sup>
|
|
189
|
+
</td>
|
|
190
|
+
<td>tera</td>
|
|
191
|
+
<td>T</td>
|
|
192
|
+
<td>billion</td>
|
|
193
|
+
<td style={{ textAlign: 'right' }}>1000000000000</td>
|
|
194
|
+
</tr>
|
|
195
|
+
<tr>
|
|
196
|
+
<td>
|
|
197
|
+
10<sup>9</sup>
|
|
198
|
+
</td>
|
|
199
|
+
<td>giga</td>
|
|
200
|
+
<td>G</td>
|
|
201
|
+
<td>milliard</td>
|
|
202
|
+
<td style={{ textAlign: 'right' }}>1000000000</td>
|
|
203
|
+
</tr>
|
|
204
|
+
<tr>
|
|
205
|
+
<td>
|
|
206
|
+
10<sup>6</sup>
|
|
207
|
+
</td>
|
|
208
|
+
<td>mega</td>
|
|
209
|
+
<td>M</td>
|
|
210
|
+
<td>million</td>
|
|
211
|
+
<td style={{ textAlign: 'right' }}>1000000</td>
|
|
212
|
+
</tr>
|
|
213
|
+
<tr>
|
|
214
|
+
<td>
|
|
215
|
+
10<sup>3</sup>
|
|
216
|
+
</td>
|
|
217
|
+
<td>kilo</td>
|
|
218
|
+
<td>k</td>
|
|
219
|
+
<td>tusen</td>
|
|
220
|
+
<td style={{ textAlign: 'right' }}>1000</td>
|
|
221
|
+
</tr>
|
|
222
|
+
<tr>
|
|
223
|
+
<td>
|
|
224
|
+
10<sup>2</sup>
|
|
225
|
+
</td>
|
|
226
|
+
<td>hekto</td>
|
|
227
|
+
<td>h</td>
|
|
228
|
+
<td>hundre</td>
|
|
229
|
+
<td style={{ textAlign: 'right' }}>100</td>
|
|
230
|
+
</tr>
|
|
231
|
+
<tr>
|
|
232
|
+
<td>
|
|
233
|
+
10<sup>1</sup>
|
|
234
|
+
</td>
|
|
235
|
+
<td>deka</td>
|
|
236
|
+
<td>da</td>
|
|
237
|
+
<td>ti</td>
|
|
238
|
+
<td style={{ textAlign: 'right' }}>10</td>
|
|
239
|
+
</tr>
|
|
240
|
+
<tr>
|
|
241
|
+
<td>
|
|
242
|
+
10<sup>-1</sup>
|
|
243
|
+
</td>
|
|
244
|
+
<td>desi</td>
|
|
245
|
+
<td>d</td>
|
|
246
|
+
<td>tidel</td>
|
|
247
|
+
<td style={{ textAlign: 'right' }}>0,1</td>
|
|
248
|
+
</tr>
|
|
249
|
+
<tr>
|
|
250
|
+
<td>
|
|
251
|
+
<strong>
|
|
252
|
+
10<sup>-2</sup>
|
|
253
|
+
</strong>
|
|
254
|
+
</td>
|
|
255
|
+
<td>
|
|
256
|
+
<strong>centi</strong>
|
|
257
|
+
</td>
|
|
258
|
+
<td>
|
|
259
|
+
<strong>c</strong>
|
|
260
|
+
</td>
|
|
261
|
+
<td>
|
|
262
|
+
<strong>hundredel</strong>
|
|
263
|
+
</td>
|
|
264
|
+
<td style={{ textAlign: 'right' }}>
|
|
265
|
+
<strong>0,01</strong>
|
|
266
|
+
</td>
|
|
267
|
+
</tr>
|
|
268
|
+
<tr>
|
|
269
|
+
<td>
|
|
270
|
+
10<sup>-3</sup>
|
|
271
|
+
</td>
|
|
272
|
+
<td>milli</td>
|
|
273
|
+
<td>m</td>
|
|
274
|
+
<td>tusendel</td>
|
|
275
|
+
<td style={{ textAlign: 'right' }}>0,001</td>
|
|
276
|
+
</tr>
|
|
277
|
+
<tr>
|
|
278
|
+
<td>
|
|
279
|
+
10<sup>-6</sup>
|
|
280
|
+
</td>
|
|
281
|
+
<td>mikro</td>
|
|
282
|
+
<td />
|
|
283
|
+
<td>milliondel</td>
|
|
284
|
+
<td style={{ textAlign: 'right' }}>0,000001</td>
|
|
285
|
+
</tr>
|
|
286
|
+
<tr>
|
|
287
|
+
<td>
|
|
288
|
+
10<sup>-9</sup>
|
|
289
|
+
</td>
|
|
290
|
+
<td>nano</td>
|
|
291
|
+
<td>n</td>
|
|
292
|
+
<td>milliarddel</td>
|
|
293
|
+
<td style={{ textAlign: 'right' }}>
|
|
294
|
+
<p>0,000000001</p>
|
|
295
|
+
</td>
|
|
296
|
+
</tr>
|
|
297
|
+
</tbody>
|
|
298
|
+
</Table>
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
export const WithTitleInFirstColumn: StoryFn = () => (
|
|
302
|
+
<Table>
|
|
303
|
+
<tbody>
|
|
304
|
+
<tr>
|
|
305
|
+
<th scope="row">Tittel</th>
|
|
306
|
+
<td>peta</td>
|
|
307
|
+
<td>P</td>
|
|
308
|
+
<td>billiard</td>
|
|
309
|
+
<td>1000000000000000</td>
|
|
310
|
+
</tr>
|
|
311
|
+
<tr>
|
|
312
|
+
<th scope="row">Tittel</th>
|
|
313
|
+
<td>tera</td>
|
|
314
|
+
<td>T</td>
|
|
315
|
+
<td>billion</td>
|
|
316
|
+
<td>1000000000000</td>
|
|
317
|
+
</tr>
|
|
318
|
+
<tr>
|
|
319
|
+
<th scope="row">Tittel</th>
|
|
320
|
+
<td>giga</td>
|
|
321
|
+
<td>G</td>
|
|
322
|
+
<td>milliard</td>
|
|
323
|
+
<td>1000000000</td>
|
|
324
|
+
</tr>
|
|
325
|
+
<tr>
|
|
326
|
+
<th scope="row">Tittel</th>
|
|
327
|
+
<td>mega</td>
|
|
328
|
+
<td>M</td>
|
|
329
|
+
<td>million</td>
|
|
330
|
+
<td>1000000</td>
|
|
331
|
+
</tr>
|
|
332
|
+
<tr>
|
|
333
|
+
<th scope="row">Tittel</th>
|
|
334
|
+
<td>kilo</td>
|
|
335
|
+
<td>k</td>
|
|
336
|
+
<td>tusen</td>
|
|
337
|
+
<td>1000</td>
|
|
338
|
+
</tr>
|
|
339
|
+
</tbody>
|
|
340
|
+
</Table>
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
export const WithTitleOnFirstColumnAndTopRow: StoryFn = () => (
|
|
344
|
+
<Table>
|
|
345
|
+
<thead>
|
|
346
|
+
<tr>
|
|
347
|
+
<th />
|
|
348
|
+
<th scope="col">Prefiks</th>
|
|
349
|
+
<th scope="col">Symbol</th>
|
|
350
|
+
<th scope="col">Namn</th>
|
|
351
|
+
<th scope="col">Eksempel</th>
|
|
352
|
+
</tr>
|
|
353
|
+
</thead>
|
|
354
|
+
<tbody>
|
|
355
|
+
<tr>
|
|
356
|
+
<th scope="row">Tittel</th>
|
|
357
|
+
<td>peta</td>
|
|
358
|
+
<td>P</td>
|
|
359
|
+
<td>billiard</td>
|
|
360
|
+
<td>1000000000000000</td>
|
|
361
|
+
</tr>
|
|
362
|
+
<tr>
|
|
363
|
+
<th scope="row">Tittel</th>
|
|
364
|
+
<td>tera</td>
|
|
365
|
+
<td>T</td>
|
|
366
|
+
<td>billion</td>
|
|
367
|
+
<td>1000000000000</td>
|
|
368
|
+
</tr>
|
|
369
|
+
<tr>
|
|
370
|
+
<th scope="row">Tittel</th>
|
|
371
|
+
<td>giga</td>
|
|
372
|
+
<td>G</td>
|
|
373
|
+
<td>milliard</td>
|
|
374
|
+
<td>1000000000</td>
|
|
375
|
+
</tr>
|
|
376
|
+
<tr>
|
|
377
|
+
<th scope="row">Tittel</th>
|
|
378
|
+
<td>mega</td>
|
|
379
|
+
<td>M</td>
|
|
380
|
+
<td>million</td>
|
|
381
|
+
<td>1000000</td>
|
|
382
|
+
</tr>
|
|
383
|
+
<tr>
|
|
384
|
+
<th scope="row">Tittel</th>
|
|
385
|
+
<td>kilo</td>
|
|
386
|
+
<td>k</td>
|
|
387
|
+
<td>tusen</td>
|
|
388
|
+
<td>1000</td>
|
|
389
|
+
</tr>
|
|
390
|
+
</tbody>
|
|
391
|
+
</Table>
|
|
392
|
+
);
|
|
393
|
+
|
|
394
|
+
export const WithTitleSpanningSeveralRows: StoryFn = () => (
|
|
395
|
+
<Table>
|
|
396
|
+
<thead>
|
|
397
|
+
<tr>
|
|
398
|
+
<th colSpan={2}>Tittel over flere kolonner</th>
|
|
399
|
+
<th>Tittel</th>
|
|
400
|
+
</tr>
|
|
401
|
+
</thead>
|
|
402
|
+
<tbody>
|
|
403
|
+
<tr>
|
|
404
|
+
<td>Data 1</td>
|
|
405
|
+
<td>Data 2</td>
|
|
406
|
+
<td>Data 3</td>
|
|
407
|
+
</tr>
|
|
408
|
+
<tr>
|
|
409
|
+
<td>Data 1</td>
|
|
410
|
+
<td>Data 2</td>
|
|
411
|
+
<td>Data 3</td>
|
|
412
|
+
</tr>
|
|
413
|
+
<tr>
|
|
414
|
+
<td>Data 1</td>
|
|
415
|
+
<td>Data 2</td>
|
|
416
|
+
<td>Data 3</td>
|
|
417
|
+
</tr>
|
|
418
|
+
<tr>
|
|
419
|
+
<td>Data 1</td>
|
|
420
|
+
<td>Data 2</td>
|
|
421
|
+
<td>Data 3</td>
|
|
422
|
+
</tr>
|
|
423
|
+
</tbody>
|
|
424
|
+
</Table>
|
|
425
|
+
);
|
|
426
|
+
|
|
427
|
+
export const WithCelleSpanningSeveralRows: StoryFn = () => (
|
|
428
|
+
<Table>
|
|
429
|
+
<tbody>
|
|
430
|
+
<tr>
|
|
431
|
+
<th rowSpan={2} scope="row">
|
|
432
|
+
Tittel 1
|
|
433
|
+
</th>
|
|
434
|
+
<td>Data 1</td>
|
|
435
|
+
<td>Data 2</td>
|
|
436
|
+
</tr>
|
|
437
|
+
<tr>
|
|
438
|
+
<td>Data 1</td>
|
|
439
|
+
<td>Data 2</td>
|
|
440
|
+
</tr>
|
|
441
|
+
<tr>
|
|
442
|
+
<th scope="row">Tittel 2</th>
|
|
443
|
+
<td>Data 1</td>
|
|
444
|
+
<td>Data 2</td>
|
|
445
|
+
</tr>
|
|
446
|
+
</tbody>
|
|
447
|
+
</Table>
|
|
448
|
+
);
|
|
449
|
+
export const WithSeveralTitleRows: StoryFn = () => (
|
|
450
|
+
<Table>
|
|
451
|
+
<thead>
|
|
452
|
+
<tr>
|
|
453
|
+
<th>Tittel 1</th>
|
|
454
|
+
<th colSpan={3} align="center">
|
|
455
|
+
Tittel 2
|
|
456
|
+
</th>
|
|
457
|
+
<th>Tittel 3</th>
|
|
458
|
+
</tr>
|
|
459
|
+
<tr>
|
|
460
|
+
<th />
|
|
461
|
+
<th>Tittel 1</th>
|
|
462
|
+
<th>Tittel 2</th>
|
|
463
|
+
<th>Tittel 3</th>
|
|
464
|
+
<th />
|
|
465
|
+
</tr>
|
|
466
|
+
</thead>
|
|
467
|
+
<tbody>
|
|
468
|
+
{[1, 2, 3, 4].map((index) => (
|
|
469
|
+
<tr key={index}>
|
|
470
|
+
<td>Data</td>
|
|
471
|
+
<td>Data 1</td>
|
|
472
|
+
<td>Data 2</td>
|
|
473
|
+
<td>Data 3</td>
|
|
474
|
+
<td>Data 4</td>
|
|
475
|
+
</tr>
|
|
476
|
+
))}
|
|
477
|
+
</tbody>
|
|
478
|
+
</Table>
|
|
479
|
+
);
|
|
480
|
+
|
|
481
|
+
export const WithHeaderColumn: StoryFn = () => (
|
|
482
|
+
<Table>
|
|
483
|
+
<thead>
|
|
484
|
+
<tr>
|
|
485
|
+
<th colSpan={3} align="center">
|
|
486
|
+
Tittel
|
|
487
|
+
</th>
|
|
488
|
+
</tr>
|
|
489
|
+
</thead>
|
|
490
|
+
<tbody>
|
|
491
|
+
{[1, 2, 3, 4].map((index) => (
|
|
492
|
+
<tr key={index}>
|
|
493
|
+
<td>Data</td>
|
|
494
|
+
<td>Data 1</td>
|
|
495
|
+
<td>Data 2</td>
|
|
496
|
+
</tr>
|
|
497
|
+
))}
|
|
498
|
+
</tbody>
|
|
499
|
+
</Table>
|
|
500
|
+
);
|
|
501
|
+
|
|
502
|
+
export const WithPicture: StoryFn = () => (
|
|
503
|
+
<Table>
|
|
504
|
+
<caption>Caption</caption>
|
|
505
|
+
<thead>
|
|
506
|
+
<tr>
|
|
507
|
+
<th />
|
|
508
|
+
<th style={{ textAlign: 'center' }} scope="col">
|
|
509
|
+
Fly
|
|
510
|
+
</th>
|
|
511
|
+
<th style={{ textAlign: 'center' }} scope="col">
|
|
512
|
+
Buss
|
|
513
|
+
</th>
|
|
514
|
+
<th style={{ textAlign: 'center' }} scope="col">
|
|
515
|
+
Sykkel
|
|
516
|
+
</th>
|
|
517
|
+
</tr>
|
|
518
|
+
</thead>
|
|
519
|
+
<tbody>
|
|
520
|
+
<tr>
|
|
521
|
+
<th scope="row">Bilde</th>
|
|
522
|
+
<td>
|
|
523
|
+
<img
|
|
524
|
+
alt="Fly"
|
|
525
|
+
src="https://images.pexels.com/photos/249581/pexels-photo-249581.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=187&w=315"
|
|
526
|
+
/>
|
|
527
|
+
</td>
|
|
528
|
+
<td>
|
|
529
|
+
<img
|
|
530
|
+
alt="Buss"
|
|
531
|
+
src="https://images.pexels.com/photos/34729/pexels-photo.jpg?auto=compress&cs=tinysrgb&dpr=2&h=187&w=315"
|
|
532
|
+
/>
|
|
533
|
+
</td>
|
|
534
|
+
<td>
|
|
535
|
+
<img
|
|
536
|
+
alt="Sykkel"
|
|
537
|
+
src="https://images.pexels.com/photos/326678/pexels-photo-326678.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=187&w=315"
|
|
538
|
+
/>
|
|
539
|
+
</td>
|
|
540
|
+
</tr>
|
|
541
|
+
<tr>
|
|
542
|
+
<th scope="row">Symbol</th>
|
|
543
|
+
<td style={{ textAlign: 'center' }}>
|
|
544
|
+
<svg style={{ width: '24px', height: '24px' }} viewBox="0 0 24 24">
|
|
545
|
+
<path
|
|
546
|
+
fill="#6F6F6F"
|
|
547
|
+
d="M21,16V14L13,9V3.5A1.5,1.5 0 0,0 11.5,2A1.5,1.5 0 0,0 10,3.5V9L2,14V16L10,13.5V19L8,20.5V22L11.5,21L15,22V20.5L13,19V13.5L21,16Z"
|
|
548
|
+
/>
|
|
549
|
+
</svg>
|
|
550
|
+
</td>
|
|
551
|
+
<td style={{ textAlign: 'center' }}>
|
|
552
|
+
<svg style={{ width: '24px', height: '24px' }} viewBox="0 0 24 24">
|
|
553
|
+
<path
|
|
554
|
+
fill="#6F6F6F"
|
|
555
|
+
d="M18,11H6V6H18M16.5,17A1.5,1.5 0 0,1 15,15.5A1.5,1.5 0 0,1 16.5,14A1.5,1.5 0 0,1 18,15.5A1.5,1.5 0 0,1 16.5,17M7.5,17A1.5,1.5 0 0,1 6,15.5A1.5,1.5 0 0,1 7.5,14A1.5,1.5 0 0,1 9,15.5A1.5,1.5 0 0,1 7.5,17M4,16C4,16.88 4.39,17.67 5,18.22V20A1,1 0 0,0 6,21H7A1,1 0 0,0 8,20V19H16V20A1,1 0 0,0 17,21H18A1,1 0 0,0 19,20V18.22C19.61,17.67 20,16.88 20,16V6C20,2.5 16.42,2 12,2C7.58,2 4,2.5 4,6V16Z"
|
|
556
|
+
/>
|
|
557
|
+
</svg>
|
|
558
|
+
</td>
|
|
559
|
+
<td style={{ textAlign: 'center' }}>
|
|
560
|
+
<svg style={{ width: '24px', height: '24px' }} viewBox="0 0 24 24">
|
|
561
|
+
<path
|
|
562
|
+
fill="#6F6F6F"
|
|
563
|
+
d="M5,20.5A3.5,3.5 0 0,1 1.5,17A3.5,3.5 0 0,1 5,13.5A3.5,3.5 0 0,1 8.5,17A3.5,3.5 0 0,1 5,20.5M5,12A5,5 0 0,0 0,17A5,5 0 0,0 5,22A5,5 0 0,0 10,17A5,5 0 0,0 5,12M14.8,10H19V8.2H15.8L13.86,4.93C13.57,4.43 13,4.1 12.4,4.1C11.93,4.1 11.5,4.29 11.2,4.6L7.5,8.29C7.19,8.6 7,9 7,9.5C7,10.13 7.33,10.66 7.85,10.97L11.2,13V18H13V11.5L10.75,9.85L13.07,7.5M19,20.5A3.5,3.5 0 0,1 15.5,17A3.5,3.5 0 0,1 19,13.5A3.5,3.5 0 0,1 22.5,17A3.5,3.5 0 0,1 19,20.5M19,12A5,5 0 0,0 14,17A5,5 0 0,0 19,22A5,5 0 0,0 24,17A5,5 0 0,0 19,12M16,4.8C17,4.8 17.8,4 17.8,3C17.8,2 17,1.2 16,1.2C15,1.2 14.2,2 14.2,3C14.2,4 15,4.8 16,4.8Z"
|
|
564
|
+
/>
|
|
565
|
+
</svg>
|
|
566
|
+
</td>
|
|
567
|
+
</tr>
|
|
568
|
+
<tr>
|
|
569
|
+
<th scope="row">Ord</th>
|
|
570
|
+
<td style={{ textAlign: 'center' }}>Fly</td>
|
|
571
|
+
<td style={{ textAlign: 'center' }}>Buss</td>
|
|
572
|
+
<td style={{ textAlign: 'center' }}>Sykkel</td>
|
|
573
|
+
</tr>
|
|
574
|
+
</tbody>
|
|
575
|
+
</Table>
|
|
576
|
+
);
|
|
577
|
+
|
|
578
|
+
export const WithScrollbar: StoryFn = () => (
|
|
579
|
+
<Table>
|
|
580
|
+
<thead>
|
|
581
|
+
<tr>
|
|
582
|
+
<th>Id</th>
|
|
583
|
+
<th>Fornavn</th>
|
|
584
|
+
<th>Etternavn</th>
|
|
585
|
+
<th>Epost</th>
|
|
586
|
+
<th>Adresse</th>
|
|
587
|
+
<th>Land</th>
|
|
588
|
+
<th>Språk</th>
|
|
589
|
+
<th>Brukernavn</th>
|
|
590
|
+
</tr>
|
|
591
|
+
</thead>
|
|
592
|
+
<tbody>
|
|
593
|
+
<tr>
|
|
594
|
+
<td>1</td>
|
|
595
|
+
<td>Rogers</td>
|
|
596
|
+
<td>Hearson</td>
|
|
597
|
+
<td>rhearson0@nifty.com</td>
|
|
598
|
+
|
|
599
|
+
<td className="u-no-wrap">34704 Duke Circle</td>
|
|
600
|
+
<td>Brazil</td>
|
|
601
|
+
<td>Fijian</td>
|
|
602
|
+
<td>rhearson0</td>
|
|
603
|
+
</tr>
|
|
604
|
+
<tr>
|
|
605
|
+
<td>2</td>
|
|
606
|
+
<td>Lucie</td>
|
|
607
|
+
<td>Jikylls</td>
|
|
608
|
+
<td>ljikylls1@csmonitor.com</td>
|
|
609
|
+
<td className="u-no-wrap">9824 Swallow Place</td>
|
|
610
|
+
<td className="u-no-wrap">Sweden/Denmark/Norway</td>
|
|
611
|
+
<td>Italian</td>
|
|
612
|
+
<td>ljikylls1</td>
|
|
613
|
+
</tr>
|
|
614
|
+
<tr>
|
|
615
|
+
<td>3</td>
|
|
616
|
+
<td>Kippie</td>
|
|
617
|
+
<td>Reeveley</td>
|
|
618
|
+
<td>kreeveley2@ebay.com</td>
|
|
619
|
+
<td className="u-no-wrap">1 Stephen Court</td>
|
|
620
|
+
<td>Namibia</td>
|
|
621
|
+
<td>West Frisian</td>
|
|
622
|
+
<td>kreeveley2</td>
|
|
623
|
+
</tr>
|
|
624
|
+
<tr>
|
|
625
|
+
<td>4</td>
|
|
626
|
+
<td>Klarrisa</td>
|
|
627
|
+
<td>Minghetti</td>
|
|
628
|
+
<td>kminghetti3@163.com</td>
|
|
629
|
+
<td className="u-no-wrap">7 Truax Point</td>
|
|
630
|
+
<td>Greece</td>
|
|
631
|
+
<td>Luxembourgish</td>
|
|
632
|
+
<td>kminghetti3</td>
|
|
633
|
+
</tr>
|
|
634
|
+
<tr>
|
|
635
|
+
<td>5</td>
|
|
636
|
+
<td>Trefor</td>
|
|
637
|
+
<td>Lambregts</td>
|
|
638
|
+
<td>tlambregts4@youtu.be</td>
|
|
639
|
+
<td className="u-no-wrap">61 Monica Center</td>
|
|
640
|
+
<td>Sweden</td>
|
|
641
|
+
<td>Northern Sotho</td>
|
|
642
|
+
<td>tlambregts4</td>
|
|
643
|
+
</tr>
|
|
644
|
+
<tr>
|
|
645
|
+
<td>6</td>
|
|
646
|
+
<td>Aridatha</td>
|
|
647
|
+
<td>Kuhnt</td>
|
|
648
|
+
<td>akuhnt5@sitemeter.com</td>
|
|
649
|
+
<td className="u-no-wrap">2898 Wayridge Terrace</td>
|
|
650
|
+
<td>China</td>
|
|
651
|
+
<td>Latvian</td>
|
|
652
|
+
<td>akuhnt5</td>
|
|
653
|
+
</tr>
|
|
654
|
+
<tr>
|
|
655
|
+
<td>7</td>
|
|
656
|
+
<td>Kalie</td>
|
|
657
|
+
<td>Olander</td>
|
|
658
|
+
<td>kolander6@loc.gov</td>
|
|
659
|
+
<td className="u-no-wrap">554 Maywood Parkway</td>
|
|
660
|
+
<td>China</td>
|
|
661
|
+
<td>Czech</td>
|
|
662
|
+
<td>kolander6</td>
|
|
663
|
+
</tr>
|
|
664
|
+
</tbody>
|
|
665
|
+
</Table>
|
|
666
|
+
);
|
|
667
|
+
|
|
668
|
+
export const WithColumnWidth: StoryFn = () => (
|
|
669
|
+
<Table>
|
|
670
|
+
<thead>
|
|
671
|
+
<tr>
|
|
672
|
+
<th style={{ width: '33.333%' }}>Fremragende</th>
|
|
673
|
+
<th style={{ width: '33.333%' }}>Kompetent</th>
|
|
674
|
+
<th style={{ width: '33.333%' }}>På vei</th>
|
|
675
|
+
</tr>
|
|
676
|
+
</thead>
|
|
677
|
+
<tbody>
|
|
678
|
+
<tr>
|
|
679
|
+
<td>mestrer ulike formater for nettreklame</td>
|
|
680
|
+
<td>mestrer ett format godt, og er på god vei til å mestre flere</td>
|
|
681
|
+
<td>mestrer ett reklameformat</td>
|
|
682
|
+
</tr>
|
|
683
|
+
<tr>
|
|
684
|
+
<td>bruker de samme prinsippene for layout og komposisjon i begge annonsene</td>
|
|
685
|
+
<td>bruker layout og komposisjon i annonsene</td>
|
|
686
|
+
<td>bruker til dels prinsipper for layout og komposisjon, men hvilke og hvor de er brukt, kan være uklart</td>
|
|
687
|
+
</tr>
|
|
688
|
+
<tr>
|
|
689
|
+
<td>har reflekterte argumenter for hvorfor farger og fonter er valgt og prioritert</td>
|
|
690
|
+
<td>bruker farger og fonter som virkemidler i annonsene</td>
|
|
691
|
+
<td>Noen designvalg er gode, andre er mindre gjennomført.</td>
|
|
692
|
+
</tr>
|
|
693
|
+
<tr>
|
|
694
|
+
<td>Godt teknisk håndverk kjennetegner annonsene.</td>
|
|
695
|
+
<td>Dette er bra, men noen elementer og piksler er upresist plassert eller på avveier.</td>
|
|
696
|
+
<td>Noen elementer er godt bearbeidet, men det gjenstår litt før annonsen er ferdig designet.</td>
|
|
697
|
+
</tr>
|
|
698
|
+
<tr />
|
|
699
|
+
</tbody>
|
|
700
|
+
</Table>
|
|
701
|
+
);
|