Files
Cloud-Blog/components/TopicCard.vue
nurRiyad 4508c10b33 use useState composable
Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
2022-12-22 23:57:11 +06:00

22 lines
357 B
Vue

<script setup lang="ts">
const props = defineProps({
title: String,
dir: String,
});
const router = useRouter();
const onClick = () => {
router.push(`/tags/${props.dir}`);
};
</script>
<template>
<button
@click="onClick"
class="bg-[#a2d9ff] px-2 py-1 m-2 transition hover:scale-105 rounded-md"
>
{{ title }}
</button>
</template>