From 0deb2cc8fd7dd2497ff710a3179a4ad24b751de7 Mon Sep 17 00:00:00 2001 From: abhinavpatel0 <121202898+abhinavpatel0@users.noreply.github.com> Date: Sat, 11 Feb 2023 17:36:37 +0530 Subject: [PATCH] Update RecapBar.js --- components/wizard/RecapBar.js | 107 +++++++++++++++++----------------- 1 file changed, 52 insertions(+), 55 deletions(-) diff --git a/components/wizard/RecapBar.js b/components/wizard/RecapBar.js index 4815cf6..cf3ca74 100644 --- a/components/wizard/RecapBar.js +++ b/components/wizard/RecapBar.js @@ -65,71 +65,67 @@ export function ThemeSwitcher({ {(menuIsOpen || open) && (
{Object.keys(COLOR_THEMES).map((theme) => { - return
- {Object.keys(COLOR_THEMES).map((theme) => { - return ( - handleClick(e, theme)} - /> - ); - })} -
-)} -
-); + return ( + handleClick(e, theme)} + /> + ); + })} + + )} + + ); } -const arrowIcon = ( - - +const arrowIcon = ( + + + ); + export function FontSwitcher({ cssVariable, setData, data }) { -const handleFontChange = (e) => { -let { value } = e.target; - -let root = document.documentElement; -setData((prevData) => ({ ...prevData, [cssVariable]: value })); -root.style.setProperty(cssVariable, FONT_THEMES[value]); -}; - -return ( - -
- - {arrowIcon} -
-); + const handleFontChange = (e) => { + let { value } = e.target; + + let root = document.documentElement; + setData((prevData) => ({ ...prevData, [cssVariable]: value })); + root.style.setProperty(cssVariable, FONT_THEMES[value]); + }; + + return ( +
+ + {arrowIcon} +
+ ); } export default function RecapBar({ data, setData, onClickNext }) { const [menuIsOpen, setMenuIsOpen] = useState(false); const blogTheme = data.theme || "default"; return ( -
+

@@ -165,3 +161,4 @@ export default function RecapBar({ data, setData, onClickNext }) { +