From 142500f2a2bcae53209858ea02aff4006d785272 Mon Sep 17 00:00:00 2001 From: Shubham Date: Thu, 23 Jun 2022 23:21:08 +0530 Subject: [PATCH] Refactor globalStyle file --- components/Dark-Theme/globalStyles.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/Dark-Theme/globalStyles.js b/components/Dark-Theme/globalStyles.js index 5020e4e..f6e7c20 100644 --- a/components/Dark-Theme/globalStyles.js +++ b/components/Dark-Theme/globalStyles.js @@ -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{