2018-11-08 00:16:05 +02:00
|
|
|
const React = require('react');
|
|
|
|
const { connect } = require('react-redux');
|
2020-06-10 23:08:59 +02:00
|
|
|
const { themeStyle } = require('lib/theme');
|
2018-11-08 00:16:05 +02:00
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-21 10:14:33 +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;
|