add: iteration 1 finished

Finished simple calculator iteration
This commit is contained in:
Fiona Lena Urban 2025-04-07 18:52:48 +02:00
parent e4ff2ba229
commit 85e6035a9a
12 changed files with 293 additions and 34 deletions

View file

@ -0,0 +1,25 @@
<template>
<div class="ButtonGroup">
<button
v-for="(button, index) in buttons"
@click="click(index)"
:class="{ 'active': button.active}"
>
<Icon :name="button.icon" mode="svg" />
<span>{{ button.label }}</span>
</button>
</div>
</template>
<script setup lang="ts">
import type { Button } from '../../../shared/ButtonGroup'
type Props = {
buttons: Button[]
}
defineProps<Props>()
const emit = defineEmits(['click'])
const click = (index : number) => emit('click', index)
</script>