xuchang-new/src/components/Container.jsx
2023-11-09 15:34:52 +08:00

24 lines
568 B
JavaScript

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;