Last active
January 31, 2022 09:49
-
-
Save andrejsharapov/b55250a8721a81d9b0d147bb3e91b611 to your computer and use it in GitHub Desktop.
Sass/SCSS variables [:export] to js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$green: #1d9f1d; | |
$blue: #019ee0; | |
$red: #de2317; | |
$orange: #f5a623; | |
:export { | |
chart_green: $green; | |
chart_blue: $blue; | |
chart_red: $red; | |
chart_orange: $orange; | |
//- ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SCSS from '~/assets/sass/utils/_vars.scss'; | |
export default { | |
data() { | |
return { | |
green: SCSS.chart_green, | |
blue: SCSS.chart_blue, | |
}; | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment