Notifications working everywhere :D

This commit is contained in:
Belen Curcio
2017-01-30 15:27:09 -03:00
parent 7a227dff91
commit f7725f4143
4 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ hr {
.commentStream {
/* prevent absolutely positioned final permalink popover from being clipped */
padding-bottom: 50px;
min-height: 775px;
min-height: 500px;
position: relative;
}
@@ -3,10 +3,9 @@ import {SnackBar} from 'coral-ui';
const Notification = (props) => {
if (props.notification.text) {
// setTimeout(() => {
// props.clearNotification();
// }, props.notifLength);
setTimeout(() => {
props.clearNotification();
}, props.notifLength);
}
return (
<div>
@@ -1,7 +1,6 @@
import {connect} from 'react-redux';
import {compose} from 'react-apollo';
import React, {Component} from 'react';
import {addNotification} from '../actions/notification';
import I18n from 'coral-framework/modules/i18n/i18n';
import {myCommentHistory} from 'coral-framework/graphql/queries';
@@ -66,7 +65,7 @@ class SettingsContainer extends Component {
}
</TabContent>
<TabContent show={activeTab === 1}>
<BioContainer bio={userData.settings.bio} handleSave={this.handleSave} addNotification={this.props.addNotification} {...this.props} />
<BioContainer bio={userData.settings.bio} handleSave={this.handleSave} {...this.props} />
</TabContent>
</div>
);
+7 -3
View File
@@ -3,10 +3,14 @@ import styles from './SnackBar.css';
const SnackBar = ({children, className, position, ...attrs}) => {
return (
<div className={`${styles.SnackBar} ${className}`} style={{top: `${position}px`}} {...attrs} >
{children}
</div>
<div className={`${styles.SnackBar} ${className}`}
style={ position ? {top: `${position}px`} : fixedStyle}
{...attrs} >
{children}
</div>
);
};
const fixedStyle = {bottom: 0, top: 'auto'};
export default SnackBar;