Skip to content

Commit

Permalink
Refactor globalStyle file
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-y committed Jun 23, 2022
1 parent daf5b90 commit 142500f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/Dark-Theme/globalStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { createGlobalStyle } from 'styled-components';
const GlobalStyles = createGlobalStyle`
:root{
${({ theme }) => {
let s = ``;
for (var prop in theme) {
if (prop in theme) {
s += `--${prop}: ${theme[prop]};`;
let style = ``;
for (const variableName in theme) {
if (variableName in theme) {
style += `--${variableName}: ${theme[variableName]};`;
}
}
return s;
return style;
}}
}
body{
Expand Down

0 comments on commit 142500f

Please sign in to comment.