guild_front/src/components/Outstaffing/OutstaffingBlock.js

24 lines
621 B
JavaScript
Raw Normal View History

2021-06-02 14:04:26 +03:00
import React from 'react';
2021-06-01 15:25:01 +03:00
import style from './Outstaffing.module.css';
2021-06-03 17:15:22 +03:00
const OutstaffingBlock = ({ data = {}, onClick, onClickhandleTabBar }) => {
const { img, header, tags, name } = data;
2021-06-01 15:25:01 +03:00
return (
<div className={style.outstaffing__box}>
2021-06-03 17:15:22 +03:00
<img onClick={() => onClickhandleTabBar(name)} src={img} alt="img" />
2021-06-02 18:25:25 +03:00
<p>{header}</p>
{tags && (
<ul className={style.items}>
{tags.map((item) => (
2021-06-02 14:04:26 +03:00
<li key={item} onClick={() => onClick(item)}>
{item}
</li>
))}
2021-06-02 18:25:25 +03:00
</ul>
)}
2021-06-01 15:25:01 +03:00
</div>
);
};
export default OutstaffingBlock;