Skip to content

Commit b34f3bc

Browse files
committed
Tweak notification documentation and add dropdown gif
1 parent caf1018 commit b34f3bc

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ import {SLDSNotification} from 'design-system-react';
247247

248248
...
249249

250-
<SLDSNotification variant='toast' theme='success' icon='notification' texture={true} content={message} animated={true} />
250+
<SLDSNotification variant='alert' theme='success' icon='notification' texture={true} content={successMsg} onDismiss={this.dismissToast} />
251+
<SLDSNotification variant='alert' theme='error' icon='warning' texture={true} content={errorMsg} onDismiss={this.dismissToast} />
252+
<SLDSNotification variant='toast' theme='success' icon='notification' content={successMsg} />
251253
```
252254

253255
[![browser support](/readme-assets/SLDSNotifications.png)](/readme-assets/SLDSNotifications.png)

demo/code-snippets/SLDSNotification.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

2-
<SLDSNotification variant='toast' theme='success' icon='notification' texture={true} content={message} animated={true} />
2+
<SLDSNotification variant='alert' theme='success' icon='notification' texture={true} content={successMsg} onDismiss={this.dismissToast} />
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} />
35

46
<SLDSModal
57
isOpen={this.state.modalIsOpen}

demo/pages/HomePage/DropdownBaseSection.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,13 @@ module.exports = React.createClass( {
4343

4444

4545
<div className="slds-p-around--medium">
46-
4746
<h3 id='dropdownSection' className="slds-text-heading--medium slds-truncate">
4847
Dropdown Base
4948
</h3>
5049

5150
<PrismCode className='language-markup'>
5251
{require("raw-loader!../../code-snippets/SLDSDropdownPage.txt")}
5352
</PrismCode>
54-
5553
<div className="slds-p-vertical--large">
5654
<SLDSDropdownBase
5755
options={[
@@ -76,7 +74,6 @@ module.exports = React.createClass( {
7674
onUpdateHighlighted={this.handleOnUpdateHighlighted}
7775
/>
7876
</div>
79-
8077
</div>
8178

8279

demo/pages/HomePage/NotificationSection.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@ module.exports = React.createClass( {
9696
<div className="slds-p-vertical--small">
9797
<h4 className="slds-text-heading--small ">Alerts</h4>
9898
<div className="demo-only">
99-
Base
100-
{this.state.modalIsOpen ? null: <SLDSNotification variant='alert' theme='success' icon='notification' texture={true} content={successMsg} onDismiss={this.dismissToast} />}
101-
102-
Animated
103-
{this.state.modalIsOpen ? null: <SLDSNotification variant='alert' theme='error' icon='warning' texture={true} content={errorMsg} onDismiss={this.dismissToast} />}
99+
<div className="slds-p-bottom--small">
100+
{this.state.modalIsOpen ? null: <SLDSNotification variant='alert' theme='success' icon='notification' texture={true} content={successMsg} onDismiss={this.dismissToast} />}
101+
</div>
102+
<div className="slds-p-bottom--small">
103+
{this.state.modalIsOpen ? null: <SLDSNotification variant='alert' theme='error' icon='warning' texture={true} content={errorMsg} onDismiss={this.dismissToast} />}
104+
</div>
104105
</div>
105106
</div>
106107

readme-assets/SLDSDropdownBase.gif

Loading

readme-assets/SLDSNotifications.png

24.6 KB
Loading

0 commit comments

Comments
 (0)