This commit is contained in:
2024-08-30 01:01:33 +02:00
parent daed915c8f
commit a5d7de0147
15 changed files with 167 additions and 300 deletions

28
src/components/Quiz.vue Normal file
View File

@ -0,0 +1,28 @@
<template>
<div>
<h1>{{ quiz.title }}</h1>
<Progress :value="step" :max="quiz.questions.length -1 " />
<Question :question="question" v-if="question"/>
</div>
</template>
<script setup>
import { computed, ref } from 'vue';
import Progress from './Progress.vue';
import Question from './Question.vue';
const props = defineProps({
quiz: Object
})
const step = ref(0)
const question = computed(() => props.quiz.questions[step.value])
</script>