diff --git a/ark/docs/components/InstallationTabs.tsx b/ark/docs/components/InstallationTabs.tsx index 8a2b66764b..89caa9378b 100644 --- a/ark/docs/components/InstallationTabs.tsx +++ b/ark/docs/components/InstallationTabs.tsx @@ -1,22 +1,25 @@ import { Tab, Tabs } from "fumadocs-ui/components/tabs" import { CodeBlock } from "./CodeBlock.tsx" -const installers = ["pnpm", "npm", "yarn", "bun"] as const satisfies string[] - -export type Installer = (typeof installers)[number] +const installerCommands = { + pnpm: "install", + npm: "install", + yarn: "add", + bun: "add" +} as const satisfies Record type InstallationTabProps = { - name: Installer + name: keyof typeof installerCommands } const InstallerTab = ({ name }: InstallationTabProps) => ( - {`${name} ${name === "yarn" ? "add" : "install"} arktype`} + {`${name} ${installerCommands[name]} arktype`} ) export const InstallationTabs = () => ( - +