Skip to content

Commit abd5921

Browse files
committed
Merge pull request #16 from sfdc-matrix/export-sldsmodal
enable modal
2 parents 1bbd468 + 035fabe commit abd5921

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

components/SLDSModal/index.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ module.exports = React.createClass( {
5858
},
5959

6060
componentDidMount () {
61-
Modal.setAppElement(SLDSSettings.getAppElement());
6261
//console.log('!!! window.activeElement !!! ',document.activeElement);
6362
this.setState({returnFocusTo:document.activeElement})
6463
if(!this.state.revealed){

components/SLDSSettings.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1010
*/
1111

1212
'use strict';
13+
import Modal from 'react-modal';
14+
1315

1416
let assetsPath = 'assets/';
1517
let appRoot;
@@ -25,9 +27,10 @@ module.exports = {
2527
setAppElement: (el)=>{
2628
if(el){
2729
appRoot = el;
30+
Modal.setAppElement(el);
2831
}
2932
},
3033
getAppElement: ()=>{
3134
return appRoot;
3235
}
33-
};
36+
};

components/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1212
import SLDSPicklistBase from './SLDSPicklistBase';
1313
import SLDSSettings from './SLDSSettings';
1414
import SLDSButton from './SLDSButton';
15-
//import SLDSModal from './SLDSModal';
16-
//import SLDSModalTrigger from './SLDSModal/trigger';
15+
import SLDSModal from './SLDSModal';
16+
import SLDSModalTrigger from './SLDSModal/trigger';
1717

1818
module.exports = {
1919
SLDSPicklistBase: SLDSPicklistBase,
2020
SLDSSettings: SLDSSettings,
2121
SLDSButton: SLDSButton,
22-
// SLDSModal: SLDSModal,
23-
// SLDSModalTrigger: SLDSModalTrigger
24-
};
22+
SLDSModal: SLDSModal,
23+
SLDSModalTrigger: SLDSModalTrigger
24+
};

0 commit comments

Comments
 (0)