import { useEffect, useRef } from 'react';
import useIcon from '../hooks/useIcon';
import cls from './container.module.scss';

const Container = (props) => {
	let icon = useIcon(props.icon);

	return (
		<div className={`${cls.container} ${props.className}`} style={props.style}>
			<div className={cls.container__head}>
				<img
					src={icon}
					alt="#"
					className={props.icon == 'kiln' ? cls.bigger : ''}
				/>
				<h2>{props.title}</h2>
			</div>
			<div className={cls.container__content}>{props.children}</div>
		</div>
	);
};

export default Container;
