first use of vuex

This commit is contained in:
RemiSaurel
2022-08-25 23:46:57 +02:00
parent 7f754f2e09
commit 398c261624
6 changed files with 81 additions and 45 deletions
+4 -5
View File
@@ -17,8 +17,8 @@ export default {
default: "#fdde95",
greenBlue: "#9acabf",
green: "#ABCEA7",
salmon: "#E6CEBD",
grey: "#babbc8"
grey: "#d4d4e8",
salmon: "#E6CEBD"
},
activeColor: "#504746"
}
@@ -28,6 +28,7 @@ export default {
this.removeActiveColorFromPalette()
event.target.style.borderColor = this.activeColor;
document.body.style.backgroundColor = color;
this.$store.commit("setColorSelected", color);
},
removeActiveColorFromPalette() {
const palette = document.querySelectorAll(".color-palette-item");
@@ -55,9 +56,7 @@ export default {
flex-direction: column;
justify-content: space-between;
align-items: center;
margin-top: 8px;
margin-right: 8px;
margin-left: 16px;
margin-bottom: 8px;
}
.color-palette-item {