@@ -31,39 +31,6 @@ function EventAgenda(props) {
3131}
3232
3333
34- let rand = ( ) => ( Math . floor ( Math . random ( ) * 20 ) - 10 ) ;
35-
36- const modalStyle = {
37- position : 'fixed' ,
38- zIndex : 1040 ,
39- top : 0 , bottom : 0 , left : 0 , right : 0
40- } ;
41-
42- const backdropStyle = {
43- ...modalStyle ,
44- zIndex : 'auto' ,
45- backgroundColor : '#000' ,
46- opacity : 0.5
47- } ;
48-
49- const dialogStyle = function ( ) {
50- // we use some psuedo random coords so modals
51- // don't sit right on top of each other.
52- let top = 50 + rand ( ) ;
53- let left = 50 + rand ( ) ;
54-
55- return {
56- position : 'absolute' ,
57- width : 400 ,
58- top : top + '%' , left : left + '%' ,
59- transform : `translate(-${ top } %, -${ left } %)` ,
60- border : '1px solid #e5e5e5' ,
61- backgroundColor : 'white' ,
62- boxShadow : '0 5px 15px rgba(0,0,0,.5)' ,
63- padding : 20
64- } ;
65- } ;
66-
6734const Example = React . createClass ( {
6835 getInitialState ( ) {
6936 return { showModal : false } ;
@@ -88,18 +55,6 @@ const Example = React.createClass({
8855 } }
8956 />
9057 </ main >
91- < Modal
92- aria-labelledby = 'modal-label'
93- style = { modalStyle }
94- backdropStyle = { backdropStyle }
95- show = { this . state . showModal }
96- onHide = { this . close }
97- >
98- < div style = { dialogStyle ( ) } >
99- < h4 id = 'modal-label' > Text in a modal</ h4 >
100- < p > Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</ p >
101- </ div >
102- </ Modal >
10358 </ div >
10459 ) ;
10560 } ,
0 commit comments