This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/frontend/components/Document/Document.js
2016-09-16 00:06:33 -07:00

33 lines
882 B
JavaScript

import React, { PropTypes } from 'react';
import { toJS } from 'mobx';
import { observer } from 'mobx-react';
import PublishingInfo from 'components/PublishingInfo';
import DocumentHtml from './components/DocumentHtml';
import styles from './Document.scss';
@observer
class Document extends React.Component {
static propTypes = {
document: PropTypes.object.isRequired,
}
render() {
return (
<div className={ styles.container }>
<PublishingInfo
createdAt={ this.props.document.createdAt }
createdBy={ this.props.document.createdBy }
updatedAt={ this.props.document.updatedAt }
updatedBy={ this.props.document.updatedBy }
collaborators={ toJS(this.props.document.collaborators) }
/>
<DocumentHtml html={ this.props.document.html } />
</div>
);
}
}
export default Document;