DigitalConsumer.FixMyGlass/src/common-components/radio-question/radio-question.vue
2021-11-18 15:46:26 -05:00

34 lines
769 B
Vue

<template>
<div class="radio_question">
<div class="needed_car_info d-flex mt-4 mb-3">
<span class="text-center fs-6 fw-bold w-100 needed_car_info-text">{{
questionText
}}</span>
</div>
<div class="car_list overflow-scroll position-absolute">
<div v-for="answer in answers" :key="answer" class="mb-2">
<radio
:text="answer"
:value="answer"
@click="chooseAnswer(answer)"
data-test="radio"
/>
</div>
</div>
</div>
</template>
<script>
import radio from "@/ux-components/radio/radio";
export default {
name: "radio-question",
props: {
questionText: String,
answers: Array,
chooseAnswer: Function,
},
components: {
radio,
},
};
</script>