diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2016-01-30 01:44:13 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-30 01:44:13 +0100 |
commit | f334fb4b355d90cbf0b8d9e658a87ebeec7fbe90 (patch) | |
tree | 9070ef12da288a3138fb261320e522b47c3803f5 /src/web/js/components/time.react.js | |
parent | displaying date on middle panel (diff) | |
download | newspipe-f334fb4b355d90cbf0b8d9e658a87ebeec7fbe90.tar.gz newspipe-f334fb4b355d90cbf0b8d9e658a87ebeec7fbe90.tar.bz2 newspipe-f334fb4b355d90cbf0b8d9e658a87ebeec7fbe90.zip |
wip redoing feed panel
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; |