import Image, { StaticImageData } from "next/image";
import Link from "next/link";

interface typePropData{
    id:number;
    image:StaticImageData | string;
    text:string;
    title:string;
    path:string;
}

export default function SliderCard({data}:{data:typePropData}) {
  return (
    <Link href={data.path} id="news_slider_card" className="group hover:cursor-pointer" >
        <Image src={data.image} alt="slider image" width={100} height={100} />
        <div className="relative border flex flex-col items-start justify-start">
            <div>{data.title}</div>
            <div>{data.text}</div>
        </div>
    </Link>
  )
}
