Created
December 5, 2024 03:33
-
-
Save johnlindquist/d4a94ea4c93b360e3082a0a37fd05464 to your computer and use it in GitHub Desktop.
This file contains 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