import {
	observer,
} from 'mobx-react';

@observer
export default class Background extends React.Component{
	render() {
		const {
			bg_style,
			is_bg_selected,
			handleCardItemClick,
			staffRemindStore:{cardType}
		} = this.props.store;
		
		return (
			<div 
				id="card" 
				className={`editor-body-bg${is_bg_selected ? " selected": ""} ${cardType}`} 
				style={bg_style}
				onClick={e => handleCardItemClick(e, "bg")}
			>
				{this.props.children}
			</div>
		);
	}
}