Spaces:
Runtime error
Runtime error
Download src/app/interface/grid/index.tsx from WaledRashed24/comics: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/spaces/WaledRashed24/comics/resolve/main/src/app/interface/grid/index.tsx
- Command line
-
hf download hf://spaces/WaledRashed24/comics/src/app/interface/grid/index.tsx
-
curl -L -o index.tsx https://huggingface.co/spaces/WaledRashed24/comics/resolve/main/src/app/interface/grid/index.tsx
540 Bytes
| "use client" | |
| import { ReactNode } from "react" | |
| import { cn } from "@/lib/utils" | |
| import { useStore } from "@/app/store" | |
| export function Grid({ children, className }: { children: ReactNode; className: string }) { | |
| const zoomLevel = useStore(s => s.zoomLevel) | |
| return ( | |
| <div | |
| // the "fixed" width ensure our comic keeps a consistent ratio | |
| className={cn( | |
| `w-full h-full grid`, | |
| className | |
| )} | |
| style={{ | |
| gap: `${(zoomLevel / 100) * 0.7}vw` | |
| }} | |
| > | |
| {children} | |
| </div> | |
| ) | |
| } | |