-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathindex.js
40 lines (32 loc) · 892 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Panel } from 'react-bootstrap';
import IconButton from 'components/IconButton';
import * as Actions from 'store/collections/actions';
import CollectionList from './CollectionList';
function Titlebar({ addCollection }) {
return (
<span className="clearfix">
<IconButton
onClick={() => addCollection()}
tooltip="Add new collection"
icon="plus"
className="pull-right"
/>
</span>
);
}
Titlebar.propTypes = {
addCollection: PropTypes.func.isRequired,
};
function Collections({ addCollection }) {
return (
<Panel header={<Titlebar addCollection={addCollection} />}>
<CollectionList />
</Panel>
);
}
Collections.propTypes = {
addCollection: PropTypes.func.isRequired,
};
export default connect(null, Actions)(Collections);