diff --git a/client/coral-framework/modules/notification/Notification.js b/client/coral-framework/modules/notification/Notification.js index 2a5e1d693..965c17a2d 100644 --- a/client/coral-framework/modules/notification/Notification.js +++ b/client/coral-framework/modules/notification/Notification.js @@ -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
{ props.notification.text && - + {props.notification.text} - + }
; }; diff --git a/client/coral-ui/components/SnackBar.css b/client/coral-ui/components/SnackBar.css new file mode 100644 index 000000000..3c39c4aca --- /dev/null +++ b/client/coral-ui/components/SnackBar.css @@ -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%; +} diff --git a/client/coral-ui/components/SnackBar.js b/client/coral-ui/components/SnackBar.js new file mode 100644 index 000000000..9e4abb032 --- /dev/null +++ b/client/coral-ui/components/SnackBar.js @@ -0,0 +1,8 @@ +import React from 'react'; +import styles from './SnackBar.css' + +const SnackBar = ({children}) => ( +
{children}
+); + +export default SnackBar; diff --git a/client/coral-ui/index.js b/client/coral-ui/index.js index 23d5d876a..9717134f7 100644 --- a/client/coral-ui/index.js +++ b/client/coral-ui/index.js @@ -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';