1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-06-28 00:27:40 +02:00
portfolio/src/pages/resume/ResumeSection.jsx

31 lines
818 B
React
Raw Normal View History

2020-04-08 22:11:29 +02:00
import React from 'react'
import PropTypes from 'prop-types'
import shortid from 'shortid'
import Icon from '../../components/atoms/Icon'
import ResumeItem, { ResumeItemContentProps } from './ResumeItem'
import styles from './ResumeSection.module.css'
export default function ResumeSection({ section }) {
return (
<>
<h3 className={styles.subTitle}>
<Icon name={section.icon} />
{section.name}
</h3>
<div>
{section.content.map((content) => (
<ResumeItem key={shortid.generate()} content={content} />
))}
</div>
</>
)
}
ResumeSection.propTypes = {
section: PropTypes.shape({
name: PropTypes.string.isRequired,
icon: PropTypes.string.isRequired,
content: PropTypes.arrayOf(ResumeItemContentProps).isRequired
}).isRequired
}