Some style tweaks to toggle input. Also added a v-key to children
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
<div class="toggle-container">
|
<div class="toggle-container">
|
||||||
<button
|
<button
|
||||||
v-for="option in options"
|
v-for="option in options"
|
||||||
|
:key="option"
|
||||||
class="toggle-button"
|
class="toggle-button"
|
||||||
@click="toggle(option)"
|
@click="toggle(option)"
|
||||||
:class="toggleValue === option ? 'selected' : null"
|
:class="toggleValue === option ? 'selected' : null"
|
||||||
@@ -51,8 +52,8 @@ $background-selected: $background-color-secondary;
|
|||||||
|
|
||||||
.toggle-container {
|
.toggle-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 15rem;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
overflow-x: scroll;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -72,6 +73,8 @@ $background-selected: $background-color-secondary;
|
|||||||
background-color: $background;
|
background-color: $background;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
flex: 1 0 auto;
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
|
|||||||
Reference in New Issue
Block a user