11var React = require ( 'react' ) ;
22var NotificationItem = require ( './notification-item' ) ;
33var Constants = require ( './constants' ) ;
4- var Helpers = require ( './helpers' ) ;
54
65var NotificationContainer = React . createClass ( {
76
87 propTypes : {
98 position : React . PropTypes . string . isRequired ,
10- notifications : React . PropTypes . array . isRequired
9+ notifications : React . PropTypes . array . isRequired ,
10+ getStyles : React . PropTypes . object
1111 } ,
1212
1313 _style : { } ,
@@ -17,34 +17,35 @@ var NotificationContainer = React.createClass({
1717 this . _style = this . props . getStyles . container ( this . props . position ) ;
1818
1919 if ( this . props . getStyles . overrideWidth && ( this . props . position === Constants . positions . tc || this . props . position === Constants . positions . bc ) ) {
20- this . _style [ ' marginLeft' ] = - ( this . props . getStyles . overrideWidth / 2 ) ;
20+ this . _style . marginLeft = - ( this . props . getStyles . overrideWidth / 2 ) ;
2121 }
2222 } ,
2323
2424 render : function ( ) {
2525 var self = this ;
26+ var notifications ;
2627
2728 if ( [ Constants . positions . bl , Constants . positions . br , Constants . positions . bc ] . indexOf ( this . props . position ) > - 1 ) {
2829 this . props . notifications . reverse ( ) ;
2930 }
3031
31- var notifications = this . props . notifications . map ( function ( notification ) {
32+ notifications = this . props . notifications . map ( function ( notification ) {
3233 return (
3334 < NotificationItem
34- ref = { 'notification-' + notification . uid }
35- key = { notification . uid }
36- notification = { notification }
37- getStyles = { self . props . getStyles }
38- onRemove = { self . props . onRemove }
39- noAnimation = { self . props . noAnimation }
40- allowHTML = { self . props . allowHTML }
35+ ref = { 'notification-' + notification . uid }
36+ key = { notification . uid }
37+ notification = { notification }
38+ getStyles = { self . props . getStyles }
39+ onRemove = { self . props . onRemove }
40+ noAnimation = { self . props . noAnimation }
41+ allowHTML = { self . props . allowHTML }
4142 />
4243 ) ;
4344 } ) ;
4445
4546 return (
46- < div className = { 'notifications-' + this . props . position } style = { this . _style } >
47- { notifications }
47+ < div className = { 'notifications-' + this . props . position } style = { this . _style } >
48+ { notifications }
4849 </ div >
4950 ) ;
5051 }
0 commit comments