Files
talk/client/coral-framework/modules/notification/Notification.js
T
Belen Curcio 765edb48b9 Émbed
2017-01-24 14:07:46 -03:00

20 lines
415 B
JavaScript

import React from 'react';
const Notification = (props) => {
if (props.notification.text) {
setTimeout(() => {
props.clearNotification();
}, props.notifLength);
}
return <div>
{
props.notification.text &&
<dialog open id='coral-notif' className={`coral-notif-${ props.notification.type}`}>
{props.notification.text}
</dialog>
}
</div>;
};
export default Notification;