hc99's picture
Add files using upload-large-folder tool
8766bc5 verified
raw
history blame
349 Bytes
<script lang="ts">
import { BaseButton } from "@gradio/button/static";
export let code: string;
let copy_text = "copy";
function copy(): void {
navigator.clipboard.writeText(code);
copy_text = "copied!";
setTimeout(() => {
copy_text = "copy";
}, 1500);
}
</script>
<BaseButton size="sm" on:click={copy}>
{copy_text}
</BaseButton>