I have a master component named App.vue and in that file I am calling an ajax request to the server which returns JSON of colors.
My ajax call is located inside of the vue life cycle hook named created. When the ajax is done, it will populate the local data base on the result.
In the same file, I have style written in SCSS.
<style lang="scss">
$primary: #ff2000;
$secondary: #000111;
</style>
Is it possible to share to this SCSS file block those JSON of colors from the state of the components? Please imagine the below image attached.
** CORRECTIONS **
this.colors = colors.data
.color-secondary { background: $secondary; }
The colors are dynamic that is why it is coming from a database.
Thanks in advance.
