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" >
        <Image src={data.image} alt="slider image" width={1} height={1} />
        <div className="relative border flex flex-col items-start justify-start">
            <div>{data.title}</div>
            <div>{data.text}</div>
        </div>
    </Link>
  )
}
