@@ -13,6 +13,7 @@ import { Glyphicon } from 'react-bootstrap';
1313import Button from '../misc/Button' ;
1414import HTML from '../I18N/HTML' ;
1515import Message from '../I18N/Message' ;
16+ import Portal from '../misc/Portal' ;
1617
1718export default ( {
1819 show = false ,
@@ -24,58 +25,60 @@ export default ({
2425 onExport = ( ) => { } ,
2526 onClose = ( ) => { }
2627} ) => ( show &&
27- < div className = "export-panel" >
28- < Button
29- style = { {
30- border : "none" ,
31- background : "transparent" ,
32- color : "white" ,
33- fontSize : 35 ,
34- top : 0 ,
35- right : 0 ,
36- position : 'absolute'
37- } }
38- onClick = { ( ) => onClose ( ) }
39- > < Glyphicon glyph = "1-close" />
40- </ Button >
41- < div style = { {
42- margin : 'auto' ,
43- maxWidth : 550
44- } } >
45- < div >
46- < div className = "export-panel-heading-icon" >
47- < Glyphicon glyph = "upload" />
48- </ div >
28+ < Portal >
29+ < div className = "export-panel" >
30+ < Button
31+ style = { {
32+ border : "none" ,
33+ background : "transparent" ,
34+ color : "white" ,
35+ fontSize : 35 ,
36+ top : 0 ,
37+ right : 0 ,
38+ position : 'absolute'
39+ } }
40+ onClick = { ( ) => onClose ( ) }
41+ > < Glyphicon glyph = "1-close" />
42+ </ Button >
43+ < div style = { {
44+ margin : 'auto' ,
45+ maxWidth : 550
46+ } } >
4947 < div >
50- { exportPanelTitle }
51- </ div >
52- < br />
53- < div className = "export-panel-formats-container" >
54- { toPairs ( formats ) . map ( ( [ format , { label, glyph} ] ) =>
55- < Button
56- key = { format }
57- bsStyle = "default"
58- className = { selectedFormat === format ? "format-selected" : "" }
59- onClick = { ( ) => onSelect ( format ) } >
60- < div >
61- < Glyphicon style = { { marginRight : '4px' } } glyph = { glyph } />
62- { label }
63- </ div >
64- </ Button >
65- ) }
66- </ div >
67- < br />
68- < Button bsStyle = "primary" onClick = { ( ) => onExport ( selectedFormat ) } > { exportButtonLabel } </ Button >
69- < br />
70- < br />
71- { get ( formats , `${ selectedFormat } .description` , null ) }
72- { get ( formats , `${ selectedFormat } .note` ) &&
48+ < div className = "export-panel-heading-icon" >
49+ < Glyphicon glyph = "upload" />
50+ </ div >
51+ < div >
52+ { exportPanelTitle }
53+ </ div >
54+ < br />
55+ < div className = "export-panel-formats-container" >
56+ { toPairs ( formats ) . map ( ( [ format , { label, glyph} ] ) =>
57+ < Button
58+ key = { format }
59+ bsStyle = "default"
60+ className = { selectedFormat === format ? "format-selected" : "" }
61+ onClick = { ( ) => onSelect ( format ) } >
62+ < div >
63+ < Glyphicon style = { { marginRight : '4px' } } glyph = { glyph } />
64+ { label }
65+ </ div >
66+ </ Button >
67+ ) }
68+ </ div >
69+ < br />
70+ < Button bsStyle = "primary" onClick = { ( ) => onExport ( selectedFormat ) } > { exportButtonLabel } </ Button >
71+ < br />
72+ < br />
73+ { get ( formats , `${ selectedFormat } .description` , null ) }
74+ { get ( formats , `${ selectedFormat } .note` ) &&
7375 < >
7476 < hr />
7577 { get ( formats , `${ selectedFormat } .note` ) }
7678 </ >
77- }
79+ }
80+ </ div >
7881 </ div >
7982 </ div >
80- </ div >
83+ </ Portal >
8184) ;
0 commit comments