24 lines
568 B
React
24 lines
568 B
React
|
import { useEffect, useRef } from 'react';
|
||
|
import useIcon from '../hooks/useIcon';
|
||
|
import cls from './container.module.less';
|
||
|
|
||
|
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;
|