import PCard from "./project-card";

export default function ProjectCardBlock({ title, cards }) {
  return (
    <div className="p-2 flow space-y-3 w-full">
      <div className="p-2 rounded-lg ring-2 ring-werefox-grey dark:ring-werefox-grey-darker w-full bg-werefox-grey-lighter dark:bg-werefox-grey-dark">
        <p className="sm:text-xl text-lg text-center text-werefox-blue-dark dark:text-werefox-blue">
          {title}
        </p>
      </div>
      <div className="p-2 rounded-lg ring-2 ring-werefox-grey dark:ring-werefox-grey-darker w-full bg-werefox-grey-lighter dark:bg-werefox-grey-dark">
        <ul className="space-y-3 w-full text-werefox-blue-dark dark:text-werefox-blue">
          {Object.keys(cards).map((card) => (
            <PCard
              key={card}
              title={card}
              url={cards[card].url}
              src={cards[card].src}
              alt={cards[card].alt}
              description={cards[card].description}
            />
          ))}
        </ul>
      </div>
    </div>
  );
}
