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
647 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 m-0 bg-primary-background border-primary-background hover:bg-secondary-hover active:bg-secondary-pressed hover:bg-secondary-hover shadow-none ' +
  8. (active
  9. ? 'bg-secondary-main border-secondary-main '
  10. : ' ') +
  11. className
  12. }
  13. >
  14. {children}
  15. </Link>
  16. );
  17. }