Push out notifications when opening sidebar
parent
887621f264
commit
b0b2e5c447
|
|
@ -6,10 +6,15 @@ import * as appPropTypes from './appPropTypes';
|
||||||
import * as stateActions from '../redux/stateActions';
|
import * as stateActions from '../redux/stateActions';
|
||||||
import { Appear } from './transitions';
|
import { Appear } from './transitions';
|
||||||
|
|
||||||
const Notifications = ({ notifications, onClick }) =>
|
const Notifications = ({ notifications, onClick, toolAreaOpen }) =>
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<div data-component='Notifications'>
|
<div
|
||||||
|
data-component='Notifications'
|
||||||
|
className={classnames({
|
||||||
|
'toolarea-open' : toolAreaOpen
|
||||||
|
})}
|
||||||
|
>
|
||||||
{
|
{
|
||||||
notifications.map((notification) =>
|
notifications.map((notification) =>
|
||||||
{
|
{
|
||||||
|
|
@ -33,14 +38,18 @@ const Notifications = ({ notifications, onClick }) =>
|
||||||
Notifications.propTypes =
|
Notifications.propTypes =
|
||||||
{
|
{
|
||||||
notifications : PropTypes.arrayOf(appPropTypes.Notification).isRequired,
|
notifications : PropTypes.arrayOf(appPropTypes.Notification).isRequired,
|
||||||
onClick : PropTypes.func.isRequired
|
onClick : PropTypes.func.isRequired,
|
||||||
|
toolAreaOpen : PropTypes.bool
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) =>
|
const mapStateToProps = (state) =>
|
||||||
{
|
{
|
||||||
const { notifications } = state;
|
const { notifications } = state;
|
||||||
|
|
||||||
return { notifications };
|
return {
|
||||||
|
notifications,
|
||||||
|
toolAreaOpen : state.toolarea.toolAreaOpen
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,19 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1010;
|
z-index: 1010;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
top: 0;
|
top: 45px;
|
||||||
right: 65px;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
transition: right 0.3s;
|
||||||
|
|
||||||
|
&.toolarea-open {
|
||||||
|
right: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
+desktop() {
|
+desktop() {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue