Skip to content

Commit

Permalink
docs: fix command in block toolbar (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte authored Nov 20, 2024
1 parent 9d35389 commit 22a3a81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sites/docs/src/lib/components/docs/block-toolbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
getCommand($selectedPackageManager, "execute", `shadcn-svelte@next add ${block.name}`)
);
const command = $derived(addCommand.command + " " + addCommand.args.join(" "));
const blockSource = $derived(
`https://github.com/huntabyte/shadcn-svelte/tree/next/sites/docs/src/lib/registry/new-york/block/${block.name}`
);
Expand All @@ -37,15 +39,15 @@
class="bg-muted h-7 rounded-md border shadow-none"
size="sm"
onclick={() => {
copier.copyToClipboard(addCommand.command + " " + addCommand.args.join(" "));
copier.copyToClipboard(command);
}}
>
{#if copier.isCopied}
<Check />
{:else}
<Terminal />
{/if}
{addCommand}
{command}
</Button>
<Separator orientation="vertical" class="mx-2 hidden h-4 md:flex" />
<div class="hidden h-7 items-center gap-1.5 rounded-md border p-[2px] shadow-none md:flex">
Expand Down

0 comments on commit 22a3a81

Please sign in to comment.