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.
outline/frontend/components/Document/Document.js

32 lines
881 B
JavaScript

// @flow
import React from 'react';
import { toJS } from 'mobx';
import { observer } from 'mobx-react';
import type { Document as DocumentType } from 'types';
import PublishingInfo from '../PublishingInfo';
import styles from './Document.scss';
import DocumentHtml from './components/DocumentHtml';
@observer class Document extends React.Component {
props: {
document: DocumentType,
};
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;