From af5afdc603a5fa4e4aed4cfd927ac7c61d8c1d09 Mon Sep 17 00:00:00 2001 From: PKulkoRaccoonGang Date: Wed, 22 Feb 2023 22:49:17 +0200 Subject: [PATCH] refactor: refactoring after review --- tokens/style-dictionary.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokens/style-dictionary.js b/tokens/style-dictionary.js index 5ee753b476..cfe1354a7b 100644 --- a/tokens/style-dictionary.js +++ b/tokens/style-dictionary.js @@ -166,8 +166,8 @@ StyleDictionary.registerFormat({ let customMediaVariables = ''; - Object.keys(breakpoint).forEach(key => { - customMediaVariables += `@custom-media --${breakpoint[key].name} (max-width: ${breakpoint[key].value}); \n`; + Object.values(breakpoint).forEach(item => { + customMediaVariables += `@custom-media --${item.name} (max-width: ${item.value}); \n`; }); return fileHeader({ file }) + customMediaVariables;