Some style tweaks to toggle input. Also added a v-key to children

This commit is contained in:
2022-03-04 18:25:38 +01:00
parent b9f39e690d
commit d49285f1e2

View File

@@ -2,6 +2,7 @@
<div class="toggle-container">
<button
v-for="option in options"
:key="option"
class="toggle-button"
@click="toggle(option)"
:class="toggleValue === option ? 'selected' : null"
@@ -51,8 +52,8 @@ $background-selected: $background-color-secondary;
.toggle-container {
width: 100%;
max-width: 15rem;
display: flex;
overflow-x: scroll;
flex-direction: row;
justify-content: center;
align-items: center;
@@ -72,6 +73,8 @@ $background-selected: $background-color-secondary;
background-color: $background;
text-transform: capitalize;
cursor: pointer;
display: block;
flex: 1 0 auto;
&.selected {
color: $text-color;