blob: 8b4d47d988e7434d3a7abde8b095a56882b1c28e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
var React = require('react');
var ReactIntl = require('react-intl');
var JarrTime = React.createClass({
mixins: [ReactIntl.IntlMixin],
propTypes: {stamp: React.PropTypes.number.isRequired,
text: React.PropTypes.string.isRequired},
render: function() {
return (<time dateTime={this.props.text} title={this.props.text}>
{this.formatRelative(this.props.stamp)}
</time>);
},
});
module.exports = JarrTime;
|