This is a solution to the Calculator app challenge on Frontend Mentor.
- Live Site URL: https://calculator-zhiwei.netlify.app/
- React
- SASS
- Theming
- CSS GRID
function getClass(str) {
return `${str} ${theme === 1 ? "" : theme === 2 ? "theme2" : "theme3"}`
}
<div className={getClass("body")}></div>
.body.theme1 {
background: $bodybg1;
}
.body.theme2 {
background: $bodybg2;
}
.body.theme3 {
background: $bodybg3;
}