项目文件夹

文件
Alexandru Paduraru 4dda651245 Initial commit
2025-10-22 14:59:57 +03:00

19 行
405 B
TypeScript

import { useAtom } from "jotai"
import { atomWithStorage } from "jotai/utils"
type Config = {
style: "new-york-v4"
packageManager: "npm" | "yarn" | "pnpm" | "bun"
installationType: "cli" | "manual"
}
const configAtom = atomWithStorage<Config>("config", {
style: "new-york-v4",
packageManager: "pnpm",
installationType: "cli",
})
export function useConfig() {
return useAtom(configAtom)
}