From b3dc1d56b051046904759e15c2cf9916369d9507 Mon Sep 17 00:00:00 2001 From: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:12:13 +0100 Subject: [PATCH] Add missing curly braces --- @navikt/core/react/src/layout/utilities/css.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/@navikt/core/react/src/layout/utilities/css.ts b/@navikt/core/react/src/layout/utilities/css.ts index 8c4bda1c72..4e9ca469c2 100644 --- a/@navikt/core/react/src/layout/utilities/css.ts +++ b/@navikt/core/react/src/layout/utilities/css.ts @@ -67,12 +67,15 @@ const translateTokenStringToCSS = ( .split(" ") .map((propValue, _, arr) => { // Handle special layout cases - if (specialLayout === "margin-inline" && propValue === "full") + if (specialLayout === "margin-inline" && propValue === "full") { return `calc((100vw - ${100 / arr.length}%)/-2)`; - if (specialLayout === "padding-inline" && propValue === "full") + } + if (specialLayout === "padding-inline" && propValue === "full") { return `calc((100vw - ${100 / arr.length}%)/2)`; - if (["mi", "mb"].includes(specialLayout) && propValue === "auto") + } + if (["mi", "mb"].includes(specialLayout) && propValue === "auto") { return "auto"; + } // Handle exceptions and space tokens let output = `var(--${prefix}-${tokenSubgroup}-${propValue})`;