Files
outline/app/scenes/Settings/components/ShareListItem.js
Tom Moor 2fd8b35ca9 Fixed: Modified time display on dashboard
New Time component for relative time formatting with accessibility
2018-07-01 19:56:58 -07:00

29 lines
641 B
JavaScript

// @flow
import * as React from 'react';
import ShareMenu from 'menus/ShareMenu';
import ListItem from 'components/List/Item';
import Time from 'shared/components/Time';
import type { Share } from '../../../types';
type Props = {
share: Share,
};
const ShareListItem = ({ share }: Props) => {
return (
<ListItem
key={share.id}
title={share.documentTitle}
subtitle={
<React.Fragment>
Shared <Time dateTime={share.createdAt} /> ago by{' '}
{share.createdBy.name}
</React.Fragment>
}
actions={<ShareMenu share={share} />}
/>
);
};
export default ShareListItem;