@@ -10,40 +10,11 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1010'use strict' ;
1111
1212import React from 'react' ;
13- import SLDSButton from '../../../components/SLDSButton' ;
14- import { ButtonIcon , Icon } from './../../../components/SLDSIcons' ;
1513import { default as PrismCode } from 'react-prism/lib/PrismCode' ;
16- import { EventUtil } from '../../../components/utils' ;
17- import SLDSDateInput from '../../../components/SLDSDateInput' ;
1814
19- import SLDSModal from '../../../components/SLDSModal' ;
20- import { SLDSModalTrigger , SLDSPicklistBase } from '../../../components' ;
15+ import { SLDSModal , SLDSButton , SLDSPicklistBase } from '../../../components' ;
2116
2217
23-
24-
25-
26-
27- const customStyles = {
28- content : {
29- position : 'default' ,
30- top : 'default' ,
31- left : 'default' ,
32- right : 'default' ,
33- bottom : 'default' ,
34- border : 'default' ,
35- background : 'default' ,
36- overflow : 'default' ,
37- WebkitOverflowScrolling : 'default' ,
38- borderRadius : 'default' ,
39- outline : 'default' ,
40- padding : 'default'
41- } ,
42- overlay : {
43- backgroundColor : 'default'
44- }
45- } ;
46-
4718module . exports = React . createClass ( {
4819
4920 getDefaultProps ( ) {
@@ -56,13 +27,8 @@ module.exports = React.createClass( {
5627 } ;
5728 } ,
5829
59- handleOpenModalClick ( event ) {
60- SLDSModalTrigger . open ( this . getModalConfig ( ) ) ;
61- } ,
62-
6330 openModal ( ) {
6431 this . setState ( { modalIsOpen : true } ) ;
65- SLDSModalTrigger . open ( this . getModalConfig ( ) ) ;
6632 } ,
6733
6834 closeModal ( ) {
@@ -73,7 +39,6 @@ module.exports = React.createClass( {
7339 this . closeModal ( ) ;
7440 } ,
7541
76-
7742 getModalContent ( ) {
7843 return < div >
7944 < p > Sit nulla est ex deserunt exercitation anim occaecat. Nostrud ullamco deserunt aute id consequat veniam incididunt duis in sint irure nisi. Mollit officia cillum Lorem ullamco minim nostrud elit officia tempor esse quis. Cillum sunt ad dolore
@@ -124,21 +89,6 @@ module.exports = React.createClass( {
12489 </ div > ;
12590 } ,
12691
127- getModalConfig ( ) {
128- return ( {
129- title :< span > Super Stuff</ span > ,
130- content : < div >
131- { this . getModalContent ( ) }
132-
133-
134- </ div > ,
135- footer :[
136- < button className = 'slds-button slds-button--neutral' onClick = { this . closeModal } > Cancel</ button > ,
137- < button className = 'slds-button slds-button--neutral slds-button--brand' onClick = { this . handleSubmitModal } > Save</ button >
138- ]
139- } ) ;
140- } ,
141-
14292 render ( ) {
14393 return (
14494
@@ -155,11 +105,19 @@ module.exports = React.createClass( {
155105*/ }
156106
157107 < div className = 'slds-p-vertical--large' >
158- < SLDSButton flavor = 'brand' onClick = { this . handleOpenModalClick } >
108+ < SLDSButton flavor = 'brand' onClick = { this . openModal } >
159109 Open Modal
160110 </ SLDSButton >
161-
162-
111+ < SLDSModal
112+ isOpen = { this . state . modalIsOpen }
113+ title = { < span > Super Stuff</ span > }
114+ footer = { [
115+ < button className = 'slds-button slds-button--neutral' onClick = { this . closeModal } > Cancel</ button > ,
116+ < button className = 'slds-button slds-button--neutral slds-button--brand' onClick = { this . handleSubmitModal } > Save</ button >
117+ ] }
118+ onRequestClose = { this . closeModal } >
119+ { this . getModalContent ( ) }
120+ </ SLDSModal >
163121 </ div >
164122 </ div >
165123
0 commit comments