Created
December 5, 2024 03:33
-
-
Save johnlindquist/fb415f8c08716a2b356a05c68b3a9f3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "@johnlindquist/kit" | |
import type { Choice } from "@johnlindquist/kit" | |
export const metadata: Metadata = { | |
name: "Testing Grid", | |
} | |
function generateGrid(count: number):Choice[] { | |
return Array.from({ length: count }, (_, i) => ({ | |
name: `item-${i}`, | |
html: `<div>Item ${i}</div>`, | |
className: "bg-secondary justify-around", | |
focusedClassName: "bg-primary justify-around" | |
})) | |
} | |
await grid({ | |
columnWidth: Math.floor(PROMPT.WIDTH.BASE / 3), | |
rowHeight: Math.floor(PROMPT.HEIGHT.BASE / 6), | |
gridPadding: 0, | |
gridGap: 0 | |
}, generateGrid(100)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment