import React from "react";

import "./vacancyTab.scss";

export const VacancyTab = ({ title, active, count, setActive }) => {
  return (
    <div
      className={
        active === title ? "vacancy__tab vacancy__tab--active" : "vacancy__tab"
      }
      onClick={setActive}
    >
      <p className="vacancy__tab__title">{title}</p>
      <span className="vacancy__tab__count">{count}</span>
    </div>
  );
};
