MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / IconLink

Function IconLink

app/src/components/nav/IconLink.tsx:6–34  ·  view source on GitHub ↗
({
  icon,
  label,
  href,
  color = "gray.500",
  beta,
  ...props
}: { label?: string; icon: IconType; href: string; beta?: boolean } & ProjectLinkProps<T> &
  BoxProps)

Source from the content-addressed store, hash-verified

4import { ProjectLink, type ProjectLinkProps, type ProjectRoute } from "../ProjectLink";
5
6const 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
36export default IconLink;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected