diff --git a/components/SLDSNotification/index.js b/components/SLDSNotification/index.js index 9e4f861235..bd34c9b099 100644 --- a/components/SLDSNotification/index.js +++ b/components/SLDSNotification/index.js @@ -17,14 +17,14 @@ import {Icon} from '../SLDSIcons'; class SLDSNotification extends React.Component { constructor(props){ super(props); - this.state = {isOpen: true}; + this.state = { isOpen: true }; } getClassName() { return classNames(this.props.className, 'slds-notify ', { [`slds-notify--${this.props.variant}`]: this.props.variant, [`slds-theme--${this.props.theme}`]: this.props.theme, - [`slds-theme--alert-texture`]: this.props.texture, + [`slds-theme--alert-texture-animated`]: this.props.texture, }); } diff --git a/demo/assets/styles/animations.css b/demo/assets/styles/animations.css new file mode 100644 index 0000000000..ef59711b79 --- /dev/null +++ b/demo/assets/styles/animations.css @@ -0,0 +1,11 @@ +.slds .slds-theme--alert-texture-animated { + background-image: -webkit-linear-gradient(45deg, rgba(0, 0, 0, 0.035) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.035) 50%, rgba(0, 0, 0, 0.035) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.035) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.035) 50%, rgba(0, 0, 0, 0.035) 75%, transparent 75%, transparent); + background-size: 64px 64px; + animation: progress-bar-stripes 2.4s 4 linear; +} + +@keyframes progress-bar-stripes{ + 0% { background-position:0 64px; } + 100% { background-position:0 0; } +} diff --git a/demo/assets/styles/salesforce-lightning-design-system-scoped.css b/demo/assets/styles/salesforce-lightning-design-system-scoped.css index 0daa7ca78b..c938487c32 100644 --- a/demo/assets/styles/salesforce-lightning-design-system-scoped.css +++ b/demo/assets/styles/salesforce-lightning-design-system-scoped.css @@ -4719,10 +4719,13 @@ body { color: rgba(255, 255, 255, 0.5); } .slds .slds-theme--offline a:not(.slds-button--neutral)[disabled] { color: rgba(255, 255, 255, 0.15); } + .slds .slds-theme--alert-texture { background-image: -webkit-linear-gradient(45deg, rgba(0, 0, 0, 0.035) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.035) 50%, rgba(0, 0, 0, 0.035) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.035) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.035) 50%, rgba(0, 0, 0, 0.035) 75%, transparent 75%, transparent); - background-size: 64px 64px; } + background-size: 64px 64px; + } + .slds .slds-theme--inverse-text { color: white; } .slds .slds-theme--inverse-text a:not(.slds-button--neutral) { diff --git a/demo/pages/HomePage/NotificationSection.jsx b/demo/pages/HomePage/NotificationSection.jsx index 1f6e0b01c2..cbe401c2b4 100644 --- a/demo/pages/HomePage/NotificationSection.jsx +++ b/demo/pages/HomePage/NotificationSection.jsx @@ -77,8 +77,8 @@ module.exports = React.createClass( { }, render() { - let message = ['New contact added ', Sara Smith]; - let errorMessage = 'There was a problem updating the record.'; + let successMsg = ['New contact added ', Sara Smith]; + let errorMsg = 'There was a problem updating the record.'; let toastStyle = { display: 'inline-block'}; return ( @@ -94,23 +94,32 @@ module.exports = React.createClass( {
- 1. Toasts -
-
- {this.state.modalIsOpen ? null: } +

Alerts

+
+ Base + {this.state.modalIsOpen ? null: } + + Animated + {this.state.modalIsOpen ? null: }
- 2. Modal Toasts -
+

Toasts

+ +
+ Base + {this.state.modalIsOpen ? null: } +
+ +

Modal Toasts

} + toast={} title={Lightning Design System: Style with Ease} footer={[ , diff --git a/index.html b/index.html index 4bb01b0fae..e114e1d8cd 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@ +