import { ReactNode } from "react";
import styles from "./styles.module.css";
import { Link as LinkRouter } from "react-router-dom";

function Link({
  to,
  children,
  className = "",
}: {
  to: string;
  children?: ReactNode;
  className?: string;
}) {
  return (
    <LinkRouter to={to} className={`${styles.link} ${className}`}>
      {children}
    </LinkRouter>
  );
}

export default Link;
