mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
* Copy the design-system app into a new one for ui-library. * Remove unneeded content. * Add supabase config. * Cleanup the css. * Add bunch of packages. * Cleanup the registry. * Regenerate the registry. * Add needed components for documenting components. * Add the pages for the components. * Fix the RegistryBlock. * Various fixes. * Add a turbo definition for ui-library. * Rename Remix to React Router. * Reorder the pages for all frameworks. * Remove the bottom pager. * Fix the pages and command menu. * Various fixes. * Minor fixes. * Add ai editor rules. * Various fixes. * Add local supabase env vars. * Try to fix a package error. * Bunch of various fixes. * Fix lint errors.
28 lines
812 B
TypeScript
28 lines
812 B
TypeScript
import { CommandCopyButton } from './command-copy-button'
|
|
|
|
interface CommandCopyProps {
|
|
name: string
|
|
}
|
|
|
|
export function Command({ name }: CommandCopyProps) {
|
|
const command = `npx shadcn@latest add ${
|
|
process.env.VERCEL_TARGET_ENV === 'production'
|
|
? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
|
|
: process.env.VERCEL_TARGET_ENV === 'preview'
|
|
? `https://${process.env.VERCEL_PROJECT_PREVIEW_URL}`
|
|
: 'http://localhost:3000'
|
|
}/r/${name}.json`
|
|
|
|
return (
|
|
<>
|
|
<div className="relative flex items-center rounded-lg bg-black px-4 py-3">
|
|
<div className="flex-1 font-mono text-sm text-white">
|
|
<span className="mr-2 text-[#888]">$</span>
|
|
{command}
|
|
</div>
|
|
<CommandCopyButton command={command} />
|
|
</div>
|
|
</>
|
|
)
|
|
}
|