This commit is contained in:
Belen Curcio
2017-01-30 08:19:18 -03:00
parent 8fe8f6c690
commit c42fea5889
4 changed files with 34 additions and 5 deletions
@@ -1,17 +1,18 @@
import React from 'react';
import {SnackBar} from 'coral-ui';
const Notification = (props) => {
if (props.notification.text) {
setTimeout(() => {
props.clearNotification();
}, props.notifLength);
// setTimeout(() => {
// props.clearNotification();
// }, props.notifLength);
}
return <div>
{
props.notification.text &&
<dialog open id='coral-notif' className={`coral-notif-${ props.notification.type}`}>
<SnackBar id='coral-notif' className={`coral-notif-${props.notification.type}`}>
{props.notification.text}
</dialog>
</SnackBar>
}
</div>;
};
+19
View File
@@ -0,0 +1,19 @@
.SnackBar {
top: 0;
background: red;
position: fixed;
cursor: default;
background-color: #323232;
z-index: 3;
display: flex;
will-change: transform;
transition: transform .25s cubic-bezier(.4,0,1,1);
pointer-events: none;
transform: translate(-50%,80px);
padding: 18px 14px;
vertical-align: middle;
color: #fff;
border-radius: 3px;
text-align: center;
left: 50%;
}
+8
View File
@@ -0,0 +1,8 @@
import React from 'react';
import styles from './SnackBar.css'
const SnackBar = ({children}) => (
<div className={styles.SnackBar}>{children}</div>
);
export default SnackBar;
+1
View File
@@ -14,3 +14,4 @@ export {default as List} from './components/List';
export {default as Item} from './components/Item';
export {default as Card} from './components/Card';
export {default as Pager} from './components/Pager';
export {default as SnackBar} from './components/SnackBar';