//Dependencies
import React, { Component , PropTypes} from 'react';
import moment from 'moment';
const propTypes = {
    hasDate: PropTypes.bool,
    uuid: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
    title: PropTypes.string.isRequired,
    content: PropTypes.string.isRequired,
    creationDate: PropTypes.string.isRequired,
    type: PropTypes.string.isRequired,
    sender: PropTypes.string.isRequired,
    targetUrl: PropTypes.string.isRequired,
    icon: PropTypes.string.isRequired,
    onRead: PropTypes.func.isRequired
};

const Notification = ({sender, creationDate, content, title, type, icon, targetUrl, hasDate, onRead, uuid}) => {
    return (
        <li data-focus='notification' data-type={type}>
            <div data-focus='notification-icon'><img src={icon}/></div>
            <div data-focus='notification-body' >
                <h4 data-focus='notification-title'>{title}</h4>
                <div data-focus='notification-content'>{content}</div>
            </div>
            {hasDate &&
                <div data-focus='notification-date'>
                    <button className="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab" onClick={() => onRead(uuid)}>
                        <i className="material-icons">done</i>
                    </button>
                    <div>{moment(creationDate).fromNow()}</div>
                </div>
            }
        </li>
    );
};

Notification.propTypes = propTypes;
Notification.displayName = 'Notification';
Notification.defaultProps = {
    hasDate: true
}
export default Notification;

@@ -1127,17 +1127,17 @@
 assName=
-%22
+'
 mdl-butt
@@ -1169,33 +1169,13 @@
 on--
-fab mdl-button--mini-fab%22
+icon'
  onC
@@ -1238,17 +1238,17 @@
 assName=
-%22
+'
 material
@@ -1257,9 +1257,9 @@
 cons
-%22
+'
 %3Edon

Change button read type (cleaner)