refactor(web): NavigationBar (sidebar) styles

This commit is contained in:
Paul Armstrong
2021-02-04 10:13:47 -08:00
committed by Blake Blackshear
parent ff62338359
commit ba0338e9d5
8 changed files with 129 additions and 71 deletions

View File

@@ -1,9 +1,16 @@
import { h } from 'preact';
import { Link as RouterLink } from 'preact-router/match';
export default function Link({ className, children, href, ...props }) {
export default function Link({
activeClassName = '',
className = 'text-blue-500 hover:underline',
children,
href,
...props
}) {
return (
<a className={`text-blue-500 dark:text-blue-400 hover:underline ${className}`} href={href} {...props}>
<RouterLink activeClassName={activeClassName} className={className} href={href} {...props}>
{children}
</a>
</RouterLink>
);
}