File tree Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,7 @@ Default Props Prop Values
4
4
* directional=false [true, false] If true, aligns buttons left and right in Footer
5
5
* tagline='' Optional tagline underneath Header title
6
6
7
- <SLDSButton
8
- label='Open Modal'
9
- variant='brand'
10
- onClick={this.openModal}
11
- />
12
-
7
+ <SLDSButton label='Open Modal' variant='brand' onClick={this.openModal} />
13
8
<SLDSModal
14
9
directional={true}
15
10
isOpen={this.state.modalIsOpen}
@@ -20,6 +15,17 @@ Default Props Prop Values
20
15
<SLDSButton key='nextBtn' label='Next' variant='brand' onClick={this.handleSubmitModal} />
21
16
]}
22
17
onRequestClose={this.closeModal}
23
- >
18
+ >
24
19
{this.getModalContent()}
25
20
</SLDSModal>
21
+
22
+ <SLDSButton label='Open Prompt' variant='neutral' onClick={this.togglePrompt} />
23
+ <SLDSModal
24
+ prompt='error'
25
+ size='medium'
26
+ isOpen={this.state.promptIsOpen}
27
+ title={<span>Service Unavailable</span>}
28
+ footer={[ <SLDSButton label='Got it' variant='neutral' onClick={this.togglePrompt} /> ]}
29
+ >
30
+ Sit nulla est ex deserunt exercitation anim occaecat. Nostrud ullamco deserunt aute id consequat veniam incididunt duis in sint irure nisi.
31
+ </SLDSModal>
Original file line number Diff line number Diff line change 1
-
1
+ Alerts
2
2
<SLDSNotification variant='alert' theme='success' icon='notification' texture={true} content={successMsg} onDismiss={this.dismissToast} />
3
3
<SLDSNotification variant='alert' theme='error' icon='warning' texture={true} content={errorMsg} onDismiss={this.dismissToast} />
4
- <SLDSNotification variant='toast' theme='success' icon='notification ' content={successMsg } />
4
+ <SLDSNotification variant='alert' icon='user ' content={offlineMsg} dismissible={false} onDismiss={this.dismissToast } />
5
5
6
+ Toasts
7
+ <SLDSNotification variant='toast' theme='success' icon='notification' content={successMsg} onDismiss={this.dismissToast} />
6
8
<SLDSModal
7
9
isOpen={this.state.modalIsOpen}
8
- toast={<SLDSNotification variant='toast' theme='error' icon='warning' texture={true} content={errorMessage } />}
10
+ toast={<SLDSNotification variant='toast' theme='error' icon='warning' content={errorMsg} onDismiss={this.dismissToast } />}
9
11
title={<span>Lightning Design System: Style with Ease</span>}
10
12
footer={[
11
13
<SLDSButton key='cancelBtn' label='Cancel' variant='neutral' onClick={this.closeModal} />,
12
14
<SLDSButton key='saveBtn' label='Save' variant='brand' onClick={this.handleSubmitModal} />
13
- ]}
14
- onRequestClose={this.closeModal}
15
- >
16
- {this.getModalContent()}
15
+ ]}
16
+ onRequestClose={this.closeModal}
17
+ >
18
+ {this.getModalContent()}
17
19
</SLDSModal>
You can’t perform that action at this time.
0 commit comments