import React from 'react'
import {Link} from 'react-router-dom';

const CustomLink = ({href, downloadFile, bg, txt, children}) => {


  return (
    // <a href={href} {...(downloadFile && { download="My_File.pdf" })} (downloadFile  download="My_File.pdf")>
    //     {context}
    // </a>
    <Link {...{
        className: 'flex gap-2 items-center px-[16px] py-[12px] text-p font-medium bg-[#8568BF] text-white rounded-full' ,
        to: href,
        target: '_blank',
        ...(downloadFile && {download: true}),
      }}>
        {children} 
    </Link>
  )
}

export default CustomLink