diff options
author | Mika Andrianarijaona <mikaoelitiana@users.noreply.github.com> | 2017-03-14 18:41:27 +0300 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-03-14 15:41:27 +0000 |
commit | a1994cf7ce3d660edd4be4a470b1239443a99275 (patch) | |
tree | 1243ec9d7a4f09134229acd63fee6ba4653062d7 /webapp/components/post_view | |
parent | 242d2cec1b9235ed48da733d89218f1e51a98415 (diff) | |
download | chat-a1994cf7ce3d660edd4be4a470b1239443a99275.tar.gz chat-a1994cf7ce3d660edd4be4a470b1239443a99275.tar.bz2 chat-a1994cf7ce3d660edd4be4a470b1239443a99275.zip |
PLT-4606: Date separator in RHS (#5606)
Diffstat (limited to 'webapp/components/post_view')
-rw-r--r-- | webapp/components/post_view/components/date_separator.jsx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/webapp/components/post_view/components/date_separator.jsx b/webapp/components/post_view/components/date_separator.jsx new file mode 100644 index 000000000..18dc0c7ff --- /dev/null +++ b/webapp/components/post_view/components/date_separator.jsx @@ -0,0 +1,27 @@ +import React from 'react'; +import {FormattedDate} from 'react-intl'; + +export default class DateSeparator extends React.Component { + render() { + return ( + <div + className='date-separator' + > + <hr className='separator__hr'/> + <div className='separator__text'> + <FormattedDate + value={this.props.date} + weekday='short' + month='short' + day='2-digit' + year='numeric' + /> + </div> + </div> + ); + } +} + +DateSeparator.propTypes = { + date: React.PropTypes.instanceOf(Date) +}; |