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.

20 lines
804 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. 'btn transition font-semibold text-base leading-6 bg-primary-background border-primary-background shadow-none ' +
  8. (active
  9. ? 'bg-secondary-main text-white border-secondary-main '
  10. : 'text-black ') +
  11. 'hover:bg-secondary-hover hover:text-white hover:border-secondary-border ' +
  12. 'active:bg-secondary-pressed active:border-secondary-border ' +
  13. className
  14. }
  15. >
  16. {children}
  17. </Link>
  18. );
  19. }