@performant-software/semantic-components 0.5.5 → 0.5.6
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/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/main.css +4 -4
- package/package.json +3 -3
- package/src/index.js +1 -0
- package/types/components/AccordionList.js.flow +2 -2
- package/types/components/AccordionSelector.js.flow +93 -86
- package/types/components/ColorPickerModal.js.flow +36 -31
- package/types/components/DataTableColumnSelector.js.flow +11 -0
- package/types/components/DataView.js.flow +36 -30
- package/types/components/DatabaseView.js.flow +126 -0
- package/types/components/DropdownMenu.js.flow +11 -1
- package/types/components/FileUploadModal.js.flow +43 -38
- package/types/components/FuzzyDate.js.flow +114 -99
- package/types/components/ListFilters.js.flow +115 -109
- package/types/components/ListTable.js.flow +7 -4
- package/types/components/LoginModal.js.flow +72 -65
- package/types/components/MenuBar.js.flow +1 -0
- package/types/components/PhotoViewer.js.flow +23 -15
- package/types/components/ReferenceCodeModal.js.flow +27 -21
- package/types/components/ReferenceTableModal.js.flow +61 -55
- package/types/components/Selectize.js.flow +50 -45
- package/types/components/TabbedModal.js.flow +30 -24
- package/types/components/VideoFrameSelector.js.flow +90 -78
- package/types/components/VideoPlayer.js.flow +58 -30
- package/types/components/ViewXML.js.flow +38 -32
- package/types/context/ModalContext.js.flow +5 -0
- package/types/index.js.flow +1 -0
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
Modal
|
|
13
13
|
} from 'semantic-ui-react';
|
|
14
14
|
import i18n from '../i18n/i18n';
|
|
15
|
+
import ModalContext from '../context/ModalContext';
|
|
15
16
|
import './LoginModal.css';
|
|
16
17
|
|
|
17
18
|
type Props = {
|
|
@@ -27,72 +28,78 @@ type Props = {
|
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
const LoginModal = (props: Props) => (
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
content={i18n.t('LoginModal.header')}
|
|
41
|
-
/>
|
|
42
|
-
<Message
|
|
43
|
-
error
|
|
44
|
-
header={i18n.t('LoginModal.loginErrorHeader')}
|
|
45
|
-
content={i18n.t('LoginModal.loginErrorContent')}
|
|
46
|
-
/>
|
|
47
|
-
<Grid
|
|
48
|
-
padded='vertically'
|
|
49
|
-
textAlign='center'
|
|
50
|
-
>
|
|
51
|
-
<Grid.Column>
|
|
52
|
-
<Grid.Row>
|
|
53
|
-
<Input
|
|
54
|
-
autoFocus
|
|
55
|
-
className='form-field'
|
|
56
|
-
icon={<Icon name='at' />}
|
|
57
|
-
onChange={props.onUsernameChange.bind(this)}
|
|
58
|
-
placeholder={props.placeholder}
|
|
59
|
-
size='huge'
|
|
60
|
-
/>
|
|
61
|
-
</Grid.Row>
|
|
62
|
-
<Grid.Row
|
|
63
|
-
className='row'
|
|
64
|
-
>
|
|
65
|
-
<Input
|
|
66
|
-
className='form-field'
|
|
67
|
-
icon={<Icon name='lock' />}
|
|
68
|
-
onChange={props.onPasswordChange.bind(this)}
|
|
69
|
-
placeholder={i18n.t('LoginModal.password')}
|
|
70
|
-
size='huge'
|
|
71
|
-
type='password'
|
|
72
|
-
/>
|
|
73
|
-
</Grid.Row>
|
|
74
|
-
</Grid.Column>
|
|
75
|
-
</Grid>
|
|
76
|
-
<Modal.Actions>
|
|
77
|
-
<Button
|
|
78
|
-
disabled={props.disabled}
|
|
79
|
-
onClick={props.onLogin.bind(this)}
|
|
80
|
-
primary
|
|
81
|
-
size='large'
|
|
82
|
-
type='submit'
|
|
83
|
-
>
|
|
84
|
-
{ i18n.t('LoginModal.buttonLogin') }
|
|
85
|
-
</Button>
|
|
86
|
-
<Button
|
|
87
|
-
inverted
|
|
88
|
-
onClick={props.onClose.bind(this)}
|
|
89
|
-
primary
|
|
90
|
-
size='large'
|
|
31
|
+
<ModalContext.Consumer>
|
|
32
|
+
{ (mountNode) => (
|
|
33
|
+
<Modal
|
|
34
|
+
as={Form}
|
|
35
|
+
className='login-modal'
|
|
36
|
+
error={props.loginFailed}
|
|
37
|
+
mountNode={mountNode}
|
|
38
|
+
open={props.open}
|
|
39
|
+
size='small'
|
|
40
|
+
trigger={props.trigger}
|
|
91
41
|
>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
42
|
+
<Header
|
|
43
|
+
icon='user circle'
|
|
44
|
+
content={i18n.t('LoginModal.header')}
|
|
45
|
+
/>
|
|
46
|
+
<Message
|
|
47
|
+
error
|
|
48
|
+
header={i18n.t('LoginModal.loginErrorHeader')}
|
|
49
|
+
content={i18n.t('LoginModal.loginErrorContent')}
|
|
50
|
+
/>
|
|
51
|
+
<Grid
|
|
52
|
+
padded='vertically'
|
|
53
|
+
textAlign='center'
|
|
54
|
+
>
|
|
55
|
+
<Grid.Column>
|
|
56
|
+
<Grid.Row>
|
|
57
|
+
<Input
|
|
58
|
+
autoFocus
|
|
59
|
+
className='form-field'
|
|
60
|
+
icon={<Icon name='at' />}
|
|
61
|
+
onChange={props.onUsernameChange.bind(this)}
|
|
62
|
+
placeholder={props.placeholder}
|
|
63
|
+
size='huge'
|
|
64
|
+
/>
|
|
65
|
+
</Grid.Row>
|
|
66
|
+
<Grid.Row
|
|
67
|
+
className='row'
|
|
68
|
+
>
|
|
69
|
+
<Input
|
|
70
|
+
className='form-field'
|
|
71
|
+
icon={<Icon name='lock' />}
|
|
72
|
+
onChange={props.onPasswordChange.bind(this)}
|
|
73
|
+
placeholder={i18n.t('LoginModal.password')}
|
|
74
|
+
size='huge'
|
|
75
|
+
type='password'
|
|
76
|
+
/>
|
|
77
|
+
</Grid.Row>
|
|
78
|
+
</Grid.Column>
|
|
79
|
+
</Grid>
|
|
80
|
+
<Modal.Actions>
|
|
81
|
+
<Button
|
|
82
|
+
disabled={props.disabled}
|
|
83
|
+
onClick={props.onLogin.bind(this)}
|
|
84
|
+
primary
|
|
85
|
+
size='large'
|
|
86
|
+
type='submit'
|
|
87
|
+
>
|
|
88
|
+
{ i18n.t('LoginModal.buttonLogin') }
|
|
89
|
+
</Button>
|
|
90
|
+
{ props.onClose && (
|
|
91
|
+
<Button
|
|
92
|
+
basic
|
|
93
|
+
onClick={props.onClose.bind(this)}
|
|
94
|
+
size='large'
|
|
95
|
+
>
|
|
96
|
+
{ i18n.t('LoginModal.buttonCancel') }
|
|
97
|
+
</Button>
|
|
98
|
+
)}
|
|
99
|
+
</Modal.Actions>
|
|
100
|
+
</Modal>
|
|
101
|
+
)}
|
|
102
|
+
</ModalContext.Consumer>
|
|
96
103
|
);
|
|
97
104
|
|
|
98
105
|
LoginModal.defaultProps = {
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Image, Modal } from 'semantic-ui-react';
|
|
5
|
+
import ModalContext from '../context/ModalContext';
|
|
5
6
|
import './PhotoViewer.css';
|
|
6
7
|
|
|
7
8
|
type Props = {
|
|
9
|
+
alt?: string,
|
|
8
10
|
image: string,
|
|
9
11
|
onClose: () => void,
|
|
10
12
|
open: boolean,
|
|
@@ -12,21 +14,27 @@ type Props = {
|
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
const PhotoViewer = (props: Props) => (
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
<ModalContext.Consumer>
|
|
18
|
+
{ (mountNode) => (
|
|
19
|
+
<Modal
|
|
20
|
+
centered={false}
|
|
21
|
+
className='photo-viewer'
|
|
22
|
+
closeIcon
|
|
23
|
+
mountNode={mountNode}
|
|
24
|
+
onClose={props.onClose.bind(this)}
|
|
25
|
+
open={props.open}
|
|
26
|
+
size={props.size}
|
|
27
|
+
>
|
|
28
|
+
<Modal.Content>
|
|
29
|
+
<Image
|
|
30
|
+
alt={props.alt}
|
|
31
|
+
fluid
|
|
32
|
+
src={props.image}
|
|
33
|
+
/>
|
|
34
|
+
</Modal.Content>
|
|
35
|
+
</Modal>
|
|
36
|
+
)}
|
|
37
|
+
</ModalContext.Consumer>
|
|
30
38
|
);
|
|
31
39
|
|
|
32
40
|
PhotoViewer.defaultProps = {
|
|
@@ -4,29 +4,35 @@ import type { EditContainerProps } from '@performant-software/shared-components'
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Form, Modal } from 'semantic-ui-react';
|
|
6
6
|
import i18n from '../i18n/i18n';
|
|
7
|
+
import ModalContext from '../context/ModalContext';
|
|
7
8
|
|
|
8
9
|
const ReferenceCodeModal = (props: EditContainerProps) => (
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
10
|
+
<ModalContext.Consumer>
|
|
11
|
+
{ (mountNode) => (
|
|
12
|
+
<Modal
|
|
13
|
+
as={Form}
|
|
14
|
+
centered={false}
|
|
15
|
+
mountNode={mountNode}
|
|
16
|
+
open
|
|
17
|
+
>
|
|
18
|
+
<Modal.Header
|
|
19
|
+
content={props.item.id
|
|
20
|
+
? i18n.t('ReferenceCodeModal.title.edit')
|
|
21
|
+
: i18n.t('ReferenceCodeModal.title.add')}
|
|
22
|
+
/>
|
|
23
|
+
<Modal.Content>
|
|
24
|
+
<Form.Input
|
|
25
|
+
error={props.isError('name')}
|
|
26
|
+
label={i18n.t('ReferenceCodeModal.labels.name')}
|
|
27
|
+
onChange={props.onTextInputChange.bind(this, 'name')}
|
|
28
|
+
required={props.isRequired('name')}
|
|
29
|
+
value={props.item.name}
|
|
30
|
+
/>
|
|
31
|
+
</Modal.Content>
|
|
32
|
+
{ props.children }
|
|
33
|
+
</Modal>
|
|
34
|
+
)}
|
|
35
|
+
</ModalContext.Consumer>
|
|
30
36
|
);
|
|
31
37
|
|
|
32
38
|
export default ReferenceCodeModal;
|
|
@@ -3,65 +3,71 @@
|
|
|
3
3
|
import type { EditContainerProps } from '@performant-software/shared-components';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Form, Header, Modal } from 'semantic-ui-react';
|
|
6
|
+
import i18n from '../i18n/i18n';
|
|
6
7
|
import EmbeddedList from './EmbeddedList';
|
|
8
|
+
import ModalContext from '../context/ModalContext';
|
|
7
9
|
import ReferenceCodeModal from './ReferenceCodeModal';
|
|
8
|
-
import i18n from '../i18n/i18n';
|
|
9
10
|
|
|
10
11
|
const ReferenceTableModal = (props: EditContainerProps) => (
|
|
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
|
-
|
|
12
|
+
<ModalContext.Consumer>
|
|
13
|
+
{ (mountNode) => (
|
|
14
|
+
<Modal
|
|
15
|
+
as={Form}
|
|
16
|
+
centered={false}
|
|
17
|
+
className='reference-table-modal'
|
|
18
|
+
mountNode={mountNode}
|
|
19
|
+
open
|
|
20
|
+
>
|
|
21
|
+
<Modal.Header
|
|
22
|
+
content={props.item.id
|
|
23
|
+
? i18n.t('ReferenceTableModal.title.edit')
|
|
24
|
+
: i18n.t('ReferenceTableModal.title.add')}
|
|
25
|
+
/>
|
|
26
|
+
<Modal.Content>
|
|
27
|
+
<Form.Input
|
|
28
|
+
error={props.isError('name')}
|
|
29
|
+
label={i18n.t('ReferenceTableModal.labels.name')}
|
|
30
|
+
onChange={props.onTextInputChange.bind(this, 'name')}
|
|
31
|
+
required={props.isRequired('name')}
|
|
32
|
+
value={props.item.name}
|
|
33
|
+
/>
|
|
34
|
+
<Form.Input
|
|
35
|
+
error={props.isError('key')}
|
|
36
|
+
label={i18n.t('ReferenceTableModal.labels.key')}
|
|
37
|
+
onChange={props.onTextInputChange.bind(this, 'key')}
|
|
38
|
+
required={props.isRequired('key')}
|
|
39
|
+
value={props.item.key}
|
|
40
|
+
/>
|
|
41
|
+
<Header
|
|
42
|
+
content={i18n.t('ReferenceTableModal.labels.referenceCodes')}
|
|
43
|
+
/>
|
|
44
|
+
<EmbeddedList
|
|
45
|
+
actions={[{
|
|
46
|
+
name: 'edit'
|
|
47
|
+
}, {
|
|
48
|
+
name: 'copy'
|
|
49
|
+
}, {
|
|
50
|
+
name: 'delete'
|
|
51
|
+
}]}
|
|
52
|
+
columns={[{
|
|
53
|
+
name: 'name',
|
|
54
|
+
label: i18n.t('ReferenceTableModal.referenceCodes.columns.name')
|
|
55
|
+
}]}
|
|
56
|
+
items={props.item.reference_codes}
|
|
57
|
+
modal={{
|
|
58
|
+
component: ReferenceCodeModal,
|
|
59
|
+
props: {
|
|
60
|
+
required: ['name']
|
|
61
|
+
}
|
|
62
|
+
}}
|
|
63
|
+
onDelete={props.onDeleteChildAssociation.bind(this, 'reference_codes')}
|
|
64
|
+
onSave={props.onSaveChildAssociation.bind(this, 'reference_codes')}
|
|
65
|
+
/>
|
|
66
|
+
</Modal.Content>
|
|
67
|
+
{ props.children }
|
|
68
|
+
</Modal>
|
|
69
|
+
)}
|
|
70
|
+
</ModalContext.Consumer>
|
|
65
71
|
);
|
|
66
72
|
|
|
67
73
|
export default ReferenceTableModal;
|
|
@@ -18,9 +18,10 @@ import {
|
|
|
18
18
|
import _ from 'underscore';
|
|
19
19
|
import SelectizeHeader from './SelectizeHeader';
|
|
20
20
|
import i18n from '../i18n/i18n';
|
|
21
|
+
import ModalContext from '../context/ModalContext';
|
|
21
22
|
import useDataList from './DataList';
|
|
22
|
-
import './Selectize.css';
|
|
23
23
|
import useList, { type Props as ListProps } from './List';
|
|
24
|
+
import './Selectize.css';
|
|
24
25
|
|
|
25
26
|
type Props = {
|
|
26
27
|
centered?: boolean,
|
|
@@ -238,51 +239,55 @@ const Selectize = (props: Props) => {
|
|
|
238
239
|
}, [onSelect, props.modal]);
|
|
239
240
|
|
|
240
241
|
return (
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
/>
|
|
252
|
-
<Modal.Content>
|
|
253
|
-
<SelectizeGrid
|
|
254
|
-
{...props}
|
|
255
|
-
actions={[]}
|
|
256
|
-
isSelected={isSelected}
|
|
257
|
-
onDelete={() => Promise.resolve()}
|
|
258
|
-
onDeleteAll={() => Promise.resolve()}
|
|
259
|
-
onItemSelection={onItemSelection}
|
|
260
|
-
onSave={onSave}
|
|
261
|
-
onSelect={onSelect}
|
|
262
|
-
selectedItem={selectedItem}
|
|
263
|
-
selectedItems={selectedItems}
|
|
264
|
-
/>
|
|
265
|
-
</Modal.Content>
|
|
266
|
-
<Modal.Actions>
|
|
267
|
-
<Button
|
|
268
|
-
onClick={props.onSave.bind(this, selectedItems)}
|
|
269
|
-
primary
|
|
270
|
-
size='medium'
|
|
271
|
-
type='submit'
|
|
272
|
-
>
|
|
273
|
-
{ i18n.t('Common.buttons.save') }
|
|
274
|
-
</Button>
|
|
275
|
-
<Button
|
|
276
|
-
inverted
|
|
277
|
-
onClick={props.onClose.bind(this)}
|
|
278
|
-
primary
|
|
279
|
-
size='medium'
|
|
280
|
-
type='button'
|
|
242
|
+
<ModalContext.Consumer>
|
|
243
|
+
{ (mountNode) => (
|
|
244
|
+
<Modal
|
|
245
|
+
as={Form}
|
|
246
|
+
centered={props.centered}
|
|
247
|
+
className='selectize'
|
|
248
|
+
mountNode={mountNode}
|
|
249
|
+
noValidate
|
|
250
|
+
open
|
|
251
|
+
size='small'
|
|
281
252
|
>
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
253
|
+
<Modal.Header
|
|
254
|
+
content={props.title}
|
|
255
|
+
/>
|
|
256
|
+
<Modal.Content>
|
|
257
|
+
<SelectizeGrid
|
|
258
|
+
{...props}
|
|
259
|
+
actions={[]}
|
|
260
|
+
isSelected={isSelected}
|
|
261
|
+
onDelete={() => Promise.resolve()}
|
|
262
|
+
onDeleteAll={() => Promise.resolve()}
|
|
263
|
+
onItemSelection={onItemSelection}
|
|
264
|
+
onSave={onSave}
|
|
265
|
+
onSelect={onSelect}
|
|
266
|
+
selectedItem={selectedItem}
|
|
267
|
+
selectedItems={selectedItems}
|
|
268
|
+
/>
|
|
269
|
+
</Modal.Content>
|
|
270
|
+
<Modal.Actions>
|
|
271
|
+
<Button
|
|
272
|
+
onClick={props.onSave.bind(this, selectedItems)}
|
|
273
|
+
primary
|
|
274
|
+
size='medium'
|
|
275
|
+
type='submit'
|
|
276
|
+
>
|
|
277
|
+
{ i18n.t('Common.buttons.save') }
|
|
278
|
+
</Button>
|
|
279
|
+
<Button
|
|
280
|
+
basic
|
|
281
|
+
onClick={props.onClose.bind(this)}
|
|
282
|
+
size='medium'
|
|
283
|
+
type='button'
|
|
284
|
+
>
|
|
285
|
+
{ i18n.t('Common.buttons.cancel') }
|
|
286
|
+
</Button>
|
|
287
|
+
</Modal.Actions>
|
|
288
|
+
</Modal>
|
|
289
|
+
)}
|
|
290
|
+
</ModalContext.Consumer>
|
|
286
291
|
);
|
|
287
292
|
};
|
|
288
293
|
|
|
@@ -4,6 +4,7 @@ import { Element } from '@performant-software/shared-components';
|
|
|
4
4
|
import React, { Component, type Node } from 'react';
|
|
5
5
|
import { Header, Menu, Modal } from 'semantic-ui-react';
|
|
6
6
|
import _ from 'underscore';
|
|
7
|
+
import ModalContext from '../context/ModalContext';
|
|
7
8
|
import './TabbedModal.css';
|
|
8
9
|
|
|
9
10
|
type Props = {
|
|
@@ -84,32 +85,37 @@ class TabbedModal extends Component<Props, State> {
|
|
|
84
85
|
const tab = _.find(tabs, (t) => t.props.name === this.state.tab);
|
|
85
86
|
|
|
86
87
|
return (
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
>
|
|
94
|
-
{ this.renderHeader() }
|
|
95
|
-
<Menu
|
|
96
|
-
float='right'
|
|
97
|
-
secondary
|
|
88
|
+
<ModalContext.Consumer>
|
|
89
|
+
{ (mountNode) => (
|
|
90
|
+
<Modal
|
|
91
|
+
className={this.getModalClasses()}
|
|
92
|
+
mountNode={mountNode}
|
|
93
|
+
{..._.omit(this.props, 'header', 'renderHeader', 'inlineTabs', 'className')}
|
|
98
94
|
>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
</Modal.Header>
|
|
102
|
-
<Modal.Content>
|
|
103
|
-
{ tab && (
|
|
104
|
-
<div
|
|
105
|
-
key={tab.props.name}
|
|
95
|
+
<Modal.Header
|
|
96
|
+
className={this.getHeaderClasses()}
|
|
106
97
|
>
|
|
107
|
-
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
98
|
+
{ this.renderHeader() }
|
|
99
|
+
<Menu
|
|
100
|
+
float='right'
|
|
101
|
+
secondary
|
|
102
|
+
>
|
|
103
|
+
{ _.map(Element.findByType(this.props.children, TabbedModal.Tab), this.renderTab.bind(this)) }
|
|
104
|
+
</Menu>
|
|
105
|
+
</Modal.Header>
|
|
106
|
+
<Modal.Content>
|
|
107
|
+
{ tab && (
|
|
108
|
+
<div
|
|
109
|
+
key={tab.props.name}
|
|
110
|
+
>
|
|
111
|
+
{ tab.props.children }
|
|
112
|
+
</div>
|
|
113
|
+
)}
|
|
114
|
+
</Modal.Content>
|
|
115
|
+
{ Element.findByType(this.props.children, Modal.Actions) }
|
|
116
|
+
</Modal>
|
|
117
|
+
)}
|
|
118
|
+
</ModalContext.Consumer>
|
|
113
119
|
);
|
|
114
120
|
}
|
|
115
121
|
|