/
GlossaryTerm.story.js
80 lines (78 loc) · 2.07 KB
/
GlossaryTerm.story.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import React from 'react'
import { storiesOf, action } from '@kadira/storybook'
import GlossaryTerm from '.'
import { Table } from 'react-bootstrap'
const copyGlossaryTerm = action('copyGlossaryTerm')
/*
* See .storybook/README.md for info on the component storybook.
*/
storiesOf('GlossaryTerm', module)
.add('simple term on its own', () => (
<Table>
<tbody>
<GlossaryTerm key={0} index={0} copyGlossaryTerm={copyGlossaryTerm}
term={{
source: 'Ambulance',
target: 'Krankenwagen'
}} />
</tbody>
</Table>
))
.add('in a table', () => (
<Table>
<thead>
<tr>
<th>Source</th>
<th>Target</th>
<th></th>
<th className="align-right hide-md">Details</th>
</tr>
</thead>
<tbody>
<GlossaryTerm key={0} index={0} copyGlossaryTerm={copyGlossaryTerm}
term={{
source: 'Ambulance',
target: 'Krankenwagen'
}} />
<GlossaryTerm key={1} index={1} copyGlossaryTerm={copyGlossaryTerm}
term={{
source: 'Hospital',
target: 'Krankenhaus'
}} />
<GlossaryTerm key={2} index={2} copyGlossaryTerm={copyGlossaryTerm}
term={{
source: 'Doctor',
target: 'Arzt'
}} />
</tbody>
</Table>
))
.add('Without translations', () => (
<Table>
<thead>
<tr>
<th>Source</th>
<th>Target</th>
<th></th>
<th className="align-right hide-md">Details</th>
</tr>
</thead>
<tbody>
<GlossaryTerm key={0} index={0} copyGlossaryTerm={copyGlossaryTerm}
term={{
source: 'Ambulance',
target: ''
}} />
<GlossaryTerm key={1} index={1} copyGlossaryTerm={copyGlossaryTerm}
term={{
source: 'Hospital',
target: ''
}} />
<GlossaryTerm key={2} index={2} copyGlossaryTerm={copyGlossaryTerm}
term={{
source: 'Doctor',
target: ''
}} />
</tbody>
</Table>
))