diff --git a/frontend/components/CenteredContent/CenteredContent.js b/frontend/components/CenteredContent/CenteredContent.js
index 6f135e1e..b9f15975 100644
--- a/frontend/components/CenteredContent/CenteredContent.js
+++ b/frontend/components/CenteredContent/CenteredContent.js
@@ -8,11 +8,11 @@ type Props = {
const Container = styled.div`
width: 100%;
- margin: 40px 20px;
+ margin: 60px 20px;
`;
const Content = styled.div`
- max-width: 740px;
+ max-width: 50em;
margin: 0 auto;
`;
diff --git a/frontend/components/Collaborators/Collaborators.js b/frontend/components/Collaborators/Collaborators.js
new file mode 100644
index 00000000..487921fd
--- /dev/null
+++ b/frontend/components/Collaborators/Collaborators.js
@@ -0,0 +1,56 @@
+// @flow
+import React from 'react';
+import moment from 'moment';
+import styled from 'styled-components';
+import { color } from 'styles/constants';
+import Flex from 'components/Flex';
+import Tooltip from 'components/Tooltip';
+import Document from 'models/Document';
+
+const Collaborators = function({ document }: { document: Document }) {
+ const {
+ createdAt,
+ updatedAt,
+ createdBy,
+ updatedBy,
+ collaborators,
+ } = document;
+ let tooltip;
+
+ if (createdAt === updatedAt) {
+ tooltip = `${createdBy.name} published ${moment(createdAt).fromNow()}`;
+ } else {
+ tooltip = `${updatedBy.name} modified ${moment(updatedAt).fromNow()}`;
+ }
+
+ return (
+
+
+ {collaborators.map(user => (
+
+ ))}
+
+
+ );
+};
+
+const Avatars = styled(Flex)`
+ flex-direction: row-reverse;
+ margin-right: 10px;
+ height: 26px;
+`;
+
+const Avatar = styled.img`
+ width: 26px;
+ height: 26px;
+ flex-shrink: 0;
+ border-radius: 50%;
+ border: 2px solid ${color.white};
+ margin-right: -13px;
+
+ &:first-child {
+ margin-right: 0;
+ }
+`;
+
+export default Collaborators;
diff --git a/frontend/components/Collaborators/index.js b/frontend/components/Collaborators/index.js
new file mode 100644
index 00000000..68cac4de
--- /dev/null
+++ b/frontend/components/Collaborators/index.js
@@ -0,0 +1,3 @@
+// @flow
+import Collaborators from './Collaborators';
+export default Collaborators;
diff --git a/frontend/components/DocumentPreview/DocumentPreview.js b/frontend/components/DocumentPreview/DocumentPreview.js
index 6703e896..91d8bff1 100644
--- a/frontend/components/DocumentPreview/DocumentPreview.js
+++ b/frontend/components/DocumentPreview/DocumentPreview.js
@@ -5,7 +5,7 @@ import { Link } from 'react-router-dom';
import Document from 'models/Document';
import styled from 'styled-components';
import { color } from 'styles/constants';
-import PublishingInfo from 'components/PublishingInfo';
+import PublishingInfo from './components/PublishingInfo';
import StarIcon from 'components/Icon/StarIcon';
type Props = {
diff --git a/frontend/components/PublishingInfo/PublishingInfo.js b/frontend/components/DocumentPreview/components/PublishingInfo.js
similarity index 70%
rename from frontend/components/PublishingInfo/PublishingInfo.js
rename to frontend/components/DocumentPreview/components/PublishingInfo.js
index 90b00c6d..878bfdda 100644
--- a/frontend/components/PublishingInfo/PublishingInfo.js
+++ b/frontend/components/DocumentPreview/components/PublishingInfo.js
@@ -5,7 +5,6 @@ import styled from 'styled-components';
import { color } from 'styles/constants';
import Collection from 'models/Collection';
import Document from 'models/Document';
-import type { User } from 'types';
import Flex from 'components/Flex';
const Container = styled(Flex)`
@@ -13,24 +12,6 @@ const Container = styled(Flex)`
font-size: 13px;
`;
-const Avatars = styled(Flex)`
- flex-direction: row-reverse;
- margin-right: 10px;
-`;
-
-const Avatar = styled.img`
- width: 26px;
- height: 26px;
- flex-shrink: 0;
- border-radius: 50%;
- border: 2px solid ${color.white};
- margin-right: -13px;
-
- &:first-child {
- margin-right: 0;
- }
-`;
-
const Modified = styled.span`
color: ${props => (props.highlight ? color.slateDark : color.slate)};
font-weight: ${props => (props.highlight ? '600' : '400')};
@@ -38,14 +19,13 @@ const Modified = styled.span`
class PublishingInfo extends Component {
props: {
- collaborators?: Array,
collection?: Collection,
document: Document,
views?: number,
};
render() {
- const { collaborators, collection, document } = this.props;
+ const { collection, document } = this.props;
const {
modifiedSinceViewed,
createdAt,
@@ -56,12 +36,6 @@ class PublishingInfo extends Component {
return (
- {collaborators &&
-
- {collaborators.map(user => (
-
- ))}
- }
{createdAt === updatedAt
?
{createdBy.name}
diff --git a/frontend/components/DropdownMenu/DropdownMenu.js b/frontend/components/DropdownMenu/DropdownMenu.js
index 36c56004..69874c0a 100644
--- a/frontend/components/DropdownMenu/DropdownMenu.js
+++ b/frontend/components/DropdownMenu/DropdownMenu.js
@@ -22,6 +22,7 @@ const DropdownMenuItem = ({ onClick, children }: MenuItemProps) => {
type DropdownMenuProps = {
label: React.Element,
children?: React.Element,
+ style?: Object,
};
@observer class DropdownMenu extends React.Component {
@@ -42,7 +43,7 @@ type DropdownMenuProps = {
{this.menuOpen &&
-