import React from "react";

type PropType = {
  selected: boolean;
  index: number;
  onClick: () => void;
  img: string;
};

export const Thumb: React.FC<PropType> = (props) => {
  const { img, selected, index, onClick } = props;

  return (
    <div
      key={index}
      className={"embla-thumbs__slide".concat(
        selected ? " embla-thumbs__slide--selected scale-[1.15] z-20" : ""
      )}
    >
      <img
        onClick={onClick}
        className="embla-thumbs__slide__img"
        src={`./images/${img}`}
        alt={img}
      />
    </div>
  );
};
