Answers for "how to bring sass variable to react component"

6

add sass to react

npm install node-sass --save-dev
Posted by: Guest on August-25-2020
1

react access scss variables

const appBarElement = document.querySelector('.appBar');
if (appBarElement) {
  const style = window.getComputedStyle(appBarElement);
  const position = style.getPropertyValue('position');
  console.log(position);
}
Posted by: Guest on July-16-2021

Code answers related to "how to bring sass variable to react component"

Code answers related to "Javascript"

Browse Popular Code Answers by Language