File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/repl/src/lib/Input Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 3
3
import type { Workspace , File } from ' ../Workspace.svelte' ;
4
4
import { tick } from ' svelte' ;
5
5
import { Checkbox , Toolbox } from ' @sveltejs/site-kit/components' ;
6
+ import { page } from ' $app/state' ;
7
+ import { SvelteURL , SvelteURLSearchParams } from ' svelte/reactivity' ;
6
8
7
9
interface Props {
8
10
runes: boolean ;
189
191
{#if download }
190
192
<button onclick ={download }>Download app</button >
191
193
{/if }
194
+
195
+ <button
196
+ onclick ={() => {
197
+ navigator .clipboard .writeText (
198
+ ` npx sv create --from-playground="${window .location .href }" `
199
+ );
200
+ alert (' Copied to clipboard! You can now paste it into your terminal.' );
201
+ }}
202
+ >
203
+ Copy <code >sv create --from-playground</code >
204
+ </button >
192
205
</Toolbox >
193
206
</div >
194
207
</div >
You can’t perform that action at this time.
0 commit comments