Spaces:
Configuration error
Configuration error
Download src/components/link/NavLink.tsx from hlsitech/hlsitechbot: direct link, hf CLI and curl.
- Browser
- Download file 617 Bytes
-
https://huggingface.co/spaces/hlsitech/hlsitechbot/resolve/main/src/components/link/NavLink.tsx
- Command line
-
hf download hf://spaces/hlsitech/hlsitechbot/src/components/link/NavLink.tsx
-
curl -L -o NavLink.tsx https://huggingface.co/spaces/hlsitech/hlsitechbot/resolve/main/src/components/link/NavLink.tsx
617 Bytes
| 'use client'; | |
| import NextLink, { LinkProps as NextLinkProps } from 'next/link'; | |
| import { | |
| CSSProperties, | |
| ComponentProps, | |
| PropsWithChildren, | |
| useMemo, | |
| } from 'react'; | |
| export type NavLinkProps = NextLinkProps & | |
| PropsWithChildren & { | |
| styles?: CSSProperties; | |
| borderRadius?: ComponentProps<typeof NextLink>['style']; | |
| }; | |
| function NavLink({ children, styles, ...props }: NavLinkProps) { | |
| const memoizedStyles = useMemo( | |
| () => ({ | |
| ...styles, | |
| }), | |
| [styles], | |
| ); | |
| return ( | |
| <NextLink style={memoizedStyles} {...props}> | |
| {children} | |
| </NextLink> | |
| ); | |
| } | |
| export default NavLink; | |