Skip to content

Commit

Permalink
fix: removed raw strings
Browse files Browse the repository at this point in the history
  • Loading branch information
sra1kumar-NULL committed Nov 12, 2024
1 parent a268310 commit 8e34555
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/next-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,17 @@ jobs:
mode?: "light" | "dark" | "system";
children?: React.ReactNode;
}) {
let cssVariablesWithMode = String.raw`/* empty */`
let cssVariablesWithMode = ""
Object.keys(config).forEach((configKey) => {
cssVariablesWithMode +=
configKey === "dark" ? String.raw`\n .dark {\n ` : String.raw`\n:root {\n`;
configKey === "dark" ? "\n .dark {\n" : "\n:root {\n";
const cssVariables = Object.keys(
config[configKey as keyof typeof config]
).reduce((acc: string, curr: string) => {
acc += String.raw`${curr}:${config[configKey as keyof typeof config][curr]}; `;
acc += "${curr}:${config[configKey as keyof typeof config][curr]};";
return acc;
}, "");
cssVariablesWithMode += String.raw`${cssVariables} \n}`;
cssVariablesWithMode += "${cssVariables} \n}";
});
setFlushStyles(cssVariablesWithMode);
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
const documentElement = document.documentElement;
if (documentElement) {
const head = documentElement.querySelector("head");
let style = head?.querySelector(String.raw`[id='${variableStyleTagId}']`);
let style = head?.querySelector("[id='${variableStyleTagId}']");
if (!style) {
style = createStyle(variableStyleTagId);
style.innerHTML = cssVariablesWithMode;
Expand Down

0 comments on commit 8e34555

Please sign in to comment.