2018-11-08 00:16:05 +02:00
|
|
|
const React = require('react');
|
|
|
|
const { connect } = require('react-redux');
|
|
|
|
const { themeStyle } = require('../theme.js');
|
|
|
|
|
|
|
|
class TagItemComponent extends React.Component {
|
|
|
|
render() {
|
|
|
|
const theme = themeStyle(this.props.theme);
|
2019-02-24 20:04:25 +02:00
|
|
|
const style = Object.assign({}, theme.tagStyle);
|
|
|
|
const title = this.props.title;
|
2018-11-08 00:16:05 +02:00
|
|
|
|
2019-02-24 20:04:25 +02:00
|
|
|
return <span style={style}>{title}</span>;
|
2018-11-08 00:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-29 14:13:23 +02:00
|
|
|
const mapStateToProps = state => {
|
2018-11-08 00:16:05 +02:00
|
|
|
return { theme: state.settings.theme };
|
|
|
|
};
|
|
|
|
|
|
|
|
const TagItem = connect(mapStateToProps)(TagItemComponent);
|
|
|
|
|
|
|
|
module.exports = TagItem;
|