Added notifications. Closes #101

- Using react-notifications to manage redux state
- Refactored Toast component to be stateless
- Toasts can be stacked
- Cleaned up CSS
- Updated stories
This commit is contained in:
Andrey Okonetchnikov
2016-10-17 12:35:31 +02:00
parent 863d90c8ee
commit f3b448106d
9 changed files with 126 additions and 109 deletions

View File

@ -5,6 +5,7 @@ import { connect } from 'react-redux';
import { Layout, Panel, NavDrawer } from 'react-toolbox/lib/layout';
import { Navigation } from 'react-toolbox/lib/navigation';
import { Link } from 'react-toolbox/lib/link';
import { Notifs } from 'redux-notifications';
import { loadConfig } from '../actions/config';
import { loginUser } from '../actions/auth';
import { currentBackend } from '../backends/backend';
@ -17,7 +18,7 @@ import {
createNewEntryInCollection,
} from '../actions/findbar';
import AppHeader from '../components/AppHeader/AppHeader';
import { Loader } from '../components/UI/index';
import { Loader, Toast } from '../components/UI/index';
import styles from './App.css';
class App extends React.Component {
@ -147,6 +148,10 @@ class App extends React.Component {
return (
<Layout theme={styles}>
<Notifs
className={styles.notifsContainer}
CustomComponent={Toast}
/>
<NavDrawer
active={navDrawerIsVisible}
scrollY