mozaik-ext-github
Version:
Mozaik github widgets
25 lines (17 loc) • 533 B
JSX
import React, { Component, PropTypes } from 'react';
import moment from 'moment';
class StatusTimestamp extends Component {
render() {
const { timestamp } = this.props;
return (
<span className="github__status__current__date">
{moment(timestamp).fromNow()}
</span>
);
}
}
StatusTimestamp.displayName = 'StatusTimestamp';
StatusTimestamp.propTypes = {
timestamp: PropTypes.string.isRequired
};
export default StatusTimestamp;