-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
32 lines (26 loc) · 731 Bytes
/
index.js
File metadata and controls
32 lines (26 loc) · 731 Bytes
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
// @flow
import React from 'react';
import { connect } from 'react-redux';
import CSSModules from 'react-css-modules';
import { SvgStar } from '../../utils/svgs';
import style from './header.scss';
type PropsType = {
title: string,
};
const Header = ({ title }: PropsType) => (
<div styleName="container">
<span styleName="react-image" />
<div styleName="row">
<SvgStar styleName="star" />
<span styleName="title">{title}</span>
<SvgStar styleName="star" />
</div>
</div>
);
const cssModuleComponet = CSSModules(Header, style);
function mapStateToProps(state: Object): Object {
return {
title: state.settings.title,
};
}
export default connect(mapStateToProps)(cssModuleComponet);