Skip to content

Commit 3d35e8b

Browse files
committed
Add in prompt as modal prop
1 parent c293ce0 commit 3d35e8b

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

demo/pages/HomePage/ModalSection.jsx

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
Copyright (c) 2015, salesforce.com, inc. All rights reserved.
3-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
5-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
6-
Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
7-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8-
*/
2+
Copyright (c) 2015, salesforce.com, inc. All rights reserved.
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
5+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
6+
Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
7+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8+
*/
99

1010
'use strict';
1111

@@ -137,7 +137,8 @@ module.exports = React.createClass( {
137137
{require("raw-loader!../../code-snippets/SLDSModal.txt")}
138138
</PrismCode>
139139

140-
<div className='slds-p-vertical--large'>
140+
<div className='slds-p-vertical--medium'>
141+
<h4 className="slds-text-heading--small ">Base</h4>
141142
<SLDSButton label='Open Modal' variant='brand' onClick={this.openModal} />
142143
<SLDSModal
143144
size='medium'
@@ -153,17 +154,22 @@ module.exports = React.createClass( {
153154
{this.getModalContent()}
154155
</SLDSModal>
155156

156-
<SLDSButton label='Open Prompt' variant='brand' onClick={this.togglePrompt} />
157-
<SLDSModal
158-
prompt='error'
159-
size='medium'
160-
isOpen={this.state.promptIsOpen}
161-
title={<span>Service Unavailable</span>}
162-
footer={[ <SLDSButton label='ok' variant='neutral' onClick={this.togglePrompt} /> ]}
163-
>
164-
Sit nulla est ex deserunt exercitation anim occaecat. Nostrud ullamco deserunt aute id consequat veniam incididunt duis in sint irure nisi.
165-
</SLDSModal>
166157
</div>
158+
159+
<div className='slds-p-vertical--medium'>
160+
<h4 className="slds-text-heading--small">Prompt</h4>
161+
<SLDSButton label='Open Prompt' variant='neutral' onClick={this.togglePrompt} />
162+
<SLDSModal
163+
prompt='error'
164+
size='medium'
165+
isOpen={this.state.promptIsOpen}
166+
title={<span>Service Unavailable</span>}
167+
footer={[ <SLDSButton label='Got it' variant='neutral' onClick={this.togglePrompt} /> ]}
168+
>
169+
Sit nulla est ex deserunt exercitation anim occaecat. Nostrud ullamco deserunt aute id consequat veniam incididunt duis in sint irure nisi.
170+
</SLDSModal>
171+
</div>
172+
167173
</div>
168174
);
169175
}

0 commit comments

Comments
 (0)