Something went wrong. Try again.
A simple to-do app focused on tasks that can be completed within a specific time span. taskline.tobinio.dev
Something went wrong. Try again.
575 B · 27 lines
Vue
at main
12345678910111213141516171819202122232425262728<script setup lang="ts"> const props = defineProps<{ content: string }>();
const active = ref(false); async function onCopyKey() { await navigator.clipboard.writeText(props.content); active.value = true; setTimeout(() => { active.value = false; }, 1000); }</script>
<template> <button @click="onCopyKey" class="cursor-pointer flex items-center" type="button" > <Icon v-if="active" name="material-symbols:check-rounded" size="20" /> <Icon v-else name="material-symbols:content-copy-outline-rounded" size="20" /> </button></template>