Files
deno/slidev/components/Counter.vue
T
thor ede6c3d118 Add initial Slidev project structure with configuration files and example slides
- Created .gitignore to exclude unnecessary files
- Added .npmrc for pnpm configuration
- Initialized deno.lock for dependency management
- Configured Netlify and Vercel deployment settings
- Created package.json with essential scripts and dependencies
- Added README.md with project introduction and usage instructions
- Included example slides in slides.md and imported slides functionality
- Developed a Counter component for interactive presentations
- Added external snippets for code examples
2025-08-01 10:52:38 +02:00

38 lines
648 B
Vue

<script setup lang="ts">
import { ref } from 'vue'
const props = defineProps({
count: {
default: 0,
},
})
const counter = ref(props.count)
</script>
<template>
<div flex="~" w="min" border="~ main rounded-md">
<button
border="r main"
p="2"
font="mono"
outline="!none"
hover:bg="gray-400 opacity-20"
@click="counter -= 1"
>
-
</button>
<span m="auto" p="2">{{ counter }}</span>
<button
border="l main"
p="2"
font="mono"
outline="!none"
hover:bg="gray-400 opacity-20"
@click="counter += 1"
>
+
</button>
</div>
</template>