button swap

This commit is contained in:
Saxon Fletcher committed 2026-09-02 13:02:12 +10:00
1 parent f7b3bde7c5
commit f32be4035f
2 files changed
+25 -30

No files matched your search

@@ -3,7 +3,7 @@
import { Check, Copy } from 'lucide-react'
import { usePathname } from 'next/navigation'
import { useEffect, useState } from 'react'
import { Button_Shadcn_ } from 'ui'
import { Button } from 'ui'
import {
buildBlockInstallPrompt,
@@ -36,20 +36,19 @@ export function BlockInstallPromptButton({
}, [copied])
return (
<Button_Shadcn_
variant="default"
size="sm"
className="h-7 gap-1 rounded-lg px-3 text-xs shadow-none"
<Button
variant="primary"
size="tiny"
icon={copied ? <Check /> : <Copy />}
onClick={() => {
navigator.clipboard.writeText(prompt)
setCopied(true)
}}
>
{copied ? <Check className="h-3.5 w-3.5" /> : <Copy className="h-3.5 w-3.5" />}
{copied ? 'Copied prompt' : 'Copy prompt'}
<span className="sr-only" role="status">
{copied ? 'Agent install prompt copied' : ''}
</span>
</Button_Shadcn_>
</Button>
)
}
@@ -1,16 +1,27 @@
import { Button_Shadcn_ } from 'ui'
import { cn } from '@/lib/utils'
import { Button } from 'ui'
export function OpenInV0Button({
name,
className,
}: { name: string } & React.ComponentProps<typeof Button_Shadcn_>) {
}: { name: string } & React.ComponentProps<typeof Button>) {
return (
<Button_Shadcn_
<Button
aria-label="Open in v0"
variant="outline"
className={cn('h-7 gap-1 rounded-lg px-3 text-xs shadow-none', className)}
size="tiny"
className={className}
iconRight={
<svg viewBox="0 0 40 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M23.3919 0H32.9188C36.7819 0 39.9136 3.13165 39.9136 6.99475V16.0805H36.0006V6.99475C36.0006 6.90167 35.9969 6.80925 35.9898 6.71766L26.4628 16.079C26.4949 16.08 26.5272 16.0805 26.5595 16.0805H36.0006V19.7762H26.5595C22.6964 19.7762 19.4788 16.6139 19.4788 12.7508V3.68923H23.3919V12.7508C23.3919 12.9253 23.4054 13.0977 23.4316 13.2668L33.1682 3.6995C33.0861 3.6927 33.003 3.68923 32.9188 3.68923H23.3919V0Z"
fill="currentColor"
/>
<path
d="M13.7688 19.0956L0 3.68759H5.53933L13.6231 12.7337V3.68759H17.7535V17.5746C17.7535 19.6705 15.1654 20.6584 13.7688 19.0956Z"
fill="currentColor"
/>
</svg>
}
asChild
>
<a
@@ -18,23 +29,8 @@ export function OpenInV0Button({
target="_blank"
rel="noreferrer"
>
Open in{' '}
<svg
viewBox="0 0 40 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="h-5 w-5 text-current"
>
<path
d="M23.3919 0H32.9188C36.7819 0 39.9136 3.13165 39.9136 6.99475V16.0805H36.0006V6.99475C36.0006 6.90167 35.9969 6.80925 35.9898 6.71766L26.4628 16.079C26.4949 16.08 26.5272 16.0805 26.5595 16.0805H36.0006V19.7762H26.5595C22.6964 19.7762 19.4788 16.6139 19.4788 12.7508V3.68923H23.3919V12.7508C23.3919 12.9253 23.4054 13.0977 23.4316 13.2668L33.1682 3.6995C33.0861 3.6927 33.003 3.68923 32.9188 3.68923H23.3919V0Z"
fill="currentColor"
></path>
<path
d="M13.7688 19.0956L0 3.68759H5.53933L13.6231 12.7337V3.68759H17.7535V17.5746C17.7535 19.6705 15.1654 20.6584 13.7688 19.0956Z"
fill="currentColor"
></path>
</svg>
Open in
</a>
</Button_Shadcn_>
</Button>
)
}