add radioButton component
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
<template>
|
||||
<div class="emphased">
|
||||
<div v-for="(val, index) in values" :id="`${questionId}-${val}`" :key="index"
|
||||
:style="{ background: colors[index] }">
|
||||
<input type="radio" :value="val" :name="String(questionId)">
|
||||
<label :for="`${questionId}-${val}`">{{ val }}</label>
|
||||
</div>
|
||||
<RadioButton v-for="(val, index) in values" :key="index" :index="index" :question-id="questionId" :val="val"
|
||||
:color="colors[index] ?? 'unset'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -32,15 +29,6 @@ const { values = ["Très bien", "Bien", "Passable", "Insuffisant", "À rejeter"]
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.emphased div {
|
||||
padding: 3px;
|
||||
border: 1px solid #444;
|
||||
border-right: none;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1 1 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.emphased div:last-child {
|
||||
border-right: 1px solid #444;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user