diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2016-02-02 23:15:37 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-02-02 23:15:37 +0100 |
commit | 082bf39a7dd7296d4f51b6b124d185135dc00989 (patch) | |
tree | 6e12cf2b67b016aff38874c389b5bf8b5242749a /src/web/js/components/time.react.js | |
parent | fixing logging (diff) | |
parent | reload and fold all button (diff) | |
download | newspipe-082bf39a7dd7296d4f51b6b124d185135dc00989.tar.gz newspipe-082bf39a7dd7296d4f51b6b124d185135dc00989.tar.bz2 newspipe-082bf39a7dd7296d4f51b6b124d185135dc00989.zip |
Merge branch 'feature/categories'
close #22
close #23
Diffstat (limited to 'src/web/js/components/time.react.js')
-rw-r--r-- | src/web/js/components/time.react.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/web/js/components/time.react.js b/src/web/js/components/time.react.js new file mode 100644 index 00000000..8b4d47d9 --- /dev/null +++ b/src/web/js/components/time.react.js @@ -0,0 +1,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; |