@@ -10,40 +10,11 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
10
10
'use strict' ;
11
11
12
12
import React from 'react' ;
13
- import SLDSButton from '../../../components/SLDSButton' ;
14
- import { ButtonIcon , Icon } from './../../../components/SLDSIcons' ;
15
13
import { default as PrismCode } from 'react-prism/lib/PrismCode' ;
16
- import { EventUtil } from '../../../components/utils' ;
17
- import SLDSDateInput from '../../../components/SLDSDateInput' ;
18
14
19
- import SLDSModal from '../../../components/SLDSModal' ;
20
- import { SLDSModalTrigger , SLDSPicklistBase } from '../../../components' ;
15
+ import { SLDSModal , SLDSButton , SLDSPicklistBase } from '../../../components' ;
21
16
22
17
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
-
47
18
module . exports = React . createClass ( {
48
19
49
20
getDefaultProps ( ) {
@@ -56,13 +27,8 @@ module.exports = React.createClass( {
56
27
} ;
57
28
} ,
58
29
59
- handleOpenModalClick ( event ) {
60
- SLDSModalTrigger . open ( this . getModalConfig ( event . target ) ) ;
61
- } ,
62
-
63
30
openModal ( ) {
64
31
this . setState ( { modalIsOpen : true } ) ;
65
- // SLDSModalTrigger.open(this.getModalConfig());
66
32
} ,
67
33
68
34
closeModal ( ) {
@@ -123,20 +89,6 @@ module.exports = React.createClass( {
123
89
</ div > ;
124
90
} ,
125
91
126
-
127
- renderModal ( ) {
128
- return < SLDSModal
129
- isOpen = { this . state . modalIsOpen }
130
- title = { < span > Super Stuff</ span > }
131
- footer = { [
132
- < button className = 'slds-button slds-button--neutral' onClick = { this . closeModal } > Cancel</ button > ,
133
- < button className = 'slds-button slds-button--neutral slds-button--brand' onClick = { this . handleSubmitModal } > Save</ button >
134
- ] }
135
- onRequestClose = { this . closeModal } >
136
- { this . getModalContent ( ) }
137
- </ SLDSModal > ;
138
- } ,
139
-
140
92
render ( ) {
141
93
return (
142
94
@@ -156,7 +108,16 @@ module.exports = React.createClass( {
156
108
< SLDSButton flavor = 'brand' onClick = { this . openModal } >
157
109
Open Modal
158
110
</ SLDSButton >
159
- { this . renderModal ( ) }
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 >
160
121
</ div >
161
122
</ div >
162
123
0 commit comments