Spaces:
Paused
Paused
Download components/shared/header/Nav/RenderEndpointIcon.tsx from Leon4gr45/paper2code-cli: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/spaces/Leon4gr45/paper2code-cli/resolve/main/components/shared/header/Nav/RenderEndpointIcon.tsx
- Command line
-
hf download hf://spaces/Leon4gr45/paper2code-cli/components/shared/header/Nav/RenderEndpointIcon.tsx
-
curl -L -o RenderEndpointIcon.tsx https://huggingface.co/spaces/Leon4gr45/paper2code-cli/resolve/main/components/shared/header/Nav/RenderEndpointIcon.tsx
472 Bytes
| "use client"; | |
| import EndpointsScrape from "@/components/app/(home)/sections/endpoints/EndpointsScrape/EndpointsScrape"; | |
| import { ComponentProps } from "react"; | |
| import { useMediaQuery } from "usehooks-ts"; | |
| export const RenderEndpointIcon = ({ | |
| icon: Icon, | |
| ...props | |
| }: { icon: typeof EndpointsScrape } & ComponentProps< | |
| typeof EndpointsScrape | |
| >) => { | |
| const isMobile = useMediaQuery("(max-width: 996px)"); | |
| return <Icon {...props} size={isMobile ? 24 : 20} />; | |
| }; | |