frigate/web/src/components/Link.jsx

17 lines
374 B
React
Raw Normal View History

2021-01-09 20:26:46 +03:00
import { h } from 'preact';
import { Link as RouterLink } from 'preact-router/match';
2021-01-09 20:26:46 +03:00
export default function Link({
activeClassName = '',
className = 'text-blue-500 hover:underline',
children,
href,
...props
}) {
2021-01-09 20:26:46 +03:00
return (
<RouterLink activeClassName={activeClassName} className={className} href={href} {...props}>
2021-01-09 20:26:46 +03:00
{children}
</RouterLink>
2021-01-09 20:26:46 +03:00
);
}