update component prop types to use JSX.IntrinsicElements

This commit is contained in:
2022-02-09 09:37:20 -05:00
parent f205a14bdc
commit 885f97fa64
40 changed files with 280 additions and 275 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import { ReactNode } from "react";
import styles from "./MenuLink.module.css";
const cx = classNames.bind(styles);
type Props = {
type MenuLinkProps = {
href: string;
icon: ReactNode;
text: string;
@@ -13,7 +13,7 @@ type Props = {
className?: string;
};
const MenuLink = ({ href, icon, text, current, className }: Props) => (
const MenuLink = ({ href, icon, text, current, className }: MenuLinkProps) => (
<Link href={href} prefetch={false}>
<a className={cx(styles.link, { current: !!current }, className)}>
{icon} <span className={styles.label}>{text}</span>