From ea2d12a4083247dd2ff0264f3b2876f8c1408101 Mon Sep 17 00:00:00 2001 From: hta218 Date: Wed, 29 May 2024 14:52:37 +0700 Subject: [PATCH] Refactor Section component to use consistent variable name for background styling --- app/components/Section.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/components/Section.tsx b/app/components/Section.tsx index f515e5d8..052c164f 100644 --- a/app/components/Section.tsx +++ b/app/components/Section.tsx @@ -94,7 +94,7 @@ export let Section = forwardRef((props, ref) => { "--section-background-color": backgroundColor, "--section-border-radius": `${borderRadius}px`, } as React.CSSProperties; - let insideBackground = backgroundFor === "content"; + let isBgForContent = backgroundFor === "content"; return ( ((props, ref) => { {...rest} style={style} className={cn(variants({ padding: width, className }), { - "has-background": !insideBackground, + "has-background": !isBgForContent, })} > - {!insideBackground && } + {!isBgForContent && }
((props, ref) => { className: containerClassName, }), { - "has-background": insideBackground, + "has-background": isBgForContent, }, )} > - {insideBackground && } + {isBgForContent && } {children}