Generateurv2/frontend/components/user/section.jsx
2022-06-24 13:42:16 +02:00

10 lines
539 B
JavaScript

import styles from '../../styles/user/section.module.scss'
import { parseClassName } from '../../utils/utils.js'
export default function Section({ name, icon, children, validate, validateMsg }) {
return <div className={styles['main']}>
<h2 className={parseClassName(['marginb-p1', styles.title])}>{icon && icon}{' '}{name}</h2>
<div className={styles["child"]}>{children}</div>
{validate && validateMsg && <button className={parseClassName(['exo-btn', styles['btn']])} onClick={validate}>{validateMsg}</button>}
</div>
}