Renamed /src to /frontend

This commit is contained in:
Jori Lallo
2016-07-24 15:32:31 -07:00
parent 19da05eee7
commit d2187c4b10
147 changed files with 10 additions and 10 deletions

View File

@@ -0,0 +1,32 @@
import React from 'react';
import moment from 'moment';
import { Avatar } from 'rebass';
import Flex from 'components/Flex';
import styles from './PublishingInfo.scss';
const PublishingInfo = (props) => {
return (
<Flex align="center" className={ styles.user }>
<Avatar src={ props.avatarUrl } size={ 24 } />
<span className={ styles.userName }>
{ props.name } published { moment(props.createdAt).fromNow() }
{ props.createdAt !== props.updatedAt ? (
<span>
&nbsp;and modified { moment(props.updatedAt).fromNow() }
</span>
) : null }
</span>
</Flex>
);
};
PublishingInfo.propTypes = {
avatarUrl: React.PropTypes.string.isRequired,
name: React.PropTypes.string.isRequired,
createdAt: React.PropTypes.string.isRequired,
updatedAt: React.PropTypes.string.isRequired,
};
export default PublishingInfo;

View File

@@ -0,0 +1,9 @@
.user {
margin-bottom: 30px;
color: #ccc;
font-size: 13px;
}
.userName {
margin: 0 0 0 10px;
}

View File

@@ -0,0 +1,2 @@
import PublishingInfo from './PublishingInfo';
export default PublishingInfo;