You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
764 B

  1. import { Link, InertiaLinkProps } from '@inertiajs/react';
  2. export default function NavLink({ active = false, className = '', children, ...props }: InertiaLinkProps & { active: boolean }) {
  3. return (
  4. <Link
  5. {...props}
  6. className={
  7. 'inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium leading-5 transition duration-150 ease-in-out focus:outline-none ' +
  8. (active
  9. ? 'border-indigo-400 text-gray-900 focus:border-indigo-700 '
  10. : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:text-gray-700 focus:border-gray-300 ') +
  11. className
  12. }
  13. >
  14. {children}
  15. </Link>
  16. );
  17. }