Properly pass color into IconLink
This commit is contained in:
@@ -23,7 +23,7 @@ import { useState, useEffect } from "react";
|
|||||||
|
|
||||||
type IconLinkProps = BoxProps & LinkProps & { label: string; icon: IconType; href: string };
|
type IconLinkProps = BoxProps & LinkProps & { label: string; icon: IconType; href: string };
|
||||||
|
|
||||||
const IconLink = ({ icon, label, href, target, ...props }: IconLinkProps) => {
|
const IconLink = ({ icon, label, href, target, color, ...props }: IconLinkProps) => {
|
||||||
const isActive = useRouter().pathname.startsWith(href);
|
const isActive = useRouter().pathname.startsWith(href);
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
@@ -38,7 +38,7 @@ const IconLink = ({ icon, label, href, target, ...props }: IconLinkProps) => {
|
|||||||
cursor="pointer"
|
cursor="pointer"
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<HStack w="full" px={4} color="gray.700">
|
<HStack w="full" px={4} color={color}>
|
||||||
<Icon as={icon} boxSize={6} mr={2} />
|
<Icon as={icon} boxSize={6} mr={2} />
|
||||||
<Text fontWeight="bold">{label}</Text>
|
<Text fontWeight="bold">{label}</Text>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
|||||||
Reference in New Issue
Block a user