({
icon,
label,
href,
color = "gray.500",
beta,
...props
}: { label?: string; icon: IconType; href: string; beta?: boolean } & ProjectLinkProps<T> &
BoxProps)
| 4 | import { ProjectLink, type ProjectLinkProps, type ProjectRoute } from "../ProjectLink"; |
| 5 | |
| 6 | const IconLink = <T extends ProjectRoute>({ |
| 7 | icon, |
| 8 | label, |
| 9 | href, |
| 10 | color = "gray.500", |
| 11 | beta, |
| 12 | ...props |
| 13 | }: { label?: string; icon: IconType; href: string; beta?: boolean } & ProjectLinkProps<T> & |
| 14 | BoxProps) => { |
| 15 | return ( |
| 16 | <ProjectLink href={href} style={{ width: "100%" }} color={color}> |
| 17 | <NavSidebarOption activeHrefPattern={href}> |
| 18 | <HStack w="full" justifyContent="space-between" p={2} {...props}> |
| 19 | <HStack w="full" justifyContent="start"> |
| 20 | <Icon as={icon} boxSize={21} mr={1} /> |
| 21 | <Text fontSize="sm" display={{ base: "none", md: "block" }} whiteSpace="nowrap"> |
| 22 | {label} |
| 23 | </Text> |
| 24 | </HStack> |
| 25 | {beta && ( |
| 26 | <Text fontSize="xs" ml={2} fontWeight="bold" color="orange.400"> |
| 27 | BETA |
| 28 | </Text> |
| 29 | )} |
| 30 | </HStack> |
| 31 | </NavSidebarOption> |
| 32 | </ProjectLink> |
| 33 | ); |
| 34 | }; |
| 35 | |
| 36 | export default IconLink; |
nothing calls this directly
no outgoing calls
no test coverage detected