Added more views and atlas APIs
This commit is contained in:
23
src/components/AtlasPreview/AtlasPreview.js
Normal file
23
src/components/AtlasPreview/AtlasPreview.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import React from 'react';
|
||||
import Link from 'react-router/lib/Link';
|
||||
|
||||
import styles from './AtlasPreview.scss';
|
||||
import classNames from 'classnames/bind';
|
||||
const cx = classNames.bind(styles);
|
||||
|
||||
class AtlasPreview extends React.Component {
|
||||
static propTypes = {
|
||||
data: React.PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={ styles.container }>
|
||||
<h2><Link to={ `/atlas/${this.props.data.id}` } className={ styles.atlasLink }>{ this.props.data.name }</Link></h2>
|
||||
<div>No documents. Why not <Link to='/new-document'>create one</Link>?</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default AtlasPreview;
|
||||
6
src/components/AtlasPreview/AtlasPreview.scss
Normal file
6
src/components/AtlasPreview/AtlasPreview.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
@import '../../utils/constants.scss';
|
||||
|
||||
.atlasLink {
|
||||
text-decoration: none;
|
||||
color: $textColor;
|
||||
}
|
||||
2
src/components/AtlasPreview/index.js
Normal file
2
src/components/AtlasPreview/index.js
Normal file
@@ -0,0 +1,2 @@
|
||||
import AtlasPreview from './AtlasPreview';
|
||||
export default AtlasPreview;
|
||||
Reference in New Issue
Block a user