Skip to content

Commit a93891c

Browse files
committed
formating removed-79
1 parent 169deb3 commit a93891c

File tree

1 file changed

+46
-64
lines changed

1 file changed

+46
-64
lines changed

client/packages/lowcoder/src/comps/comps/triContainerComp/triContainer.tsx

Lines changed: 46 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -106,42 +106,34 @@ export function TriContainer(props: TriContainerProps) {
106106
return (
107107
<div style={{padding: style.margin, height: '100%'}}>
108108
<Wrapper $style={style} $animationStyle={animationStyle}>
109-
{showHeader && (
110-
<BackgroundColorContext.Provider value={headerStyle.headerBackground}>
111-
<HeaderInnerGrid
112-
{...otherHeaderProps}
113-
items={gridItemCompToGridItems(headerItems)}
114-
autoHeight={true}
115-
emptyRows={5}
116-
minHeight="46px"
117-
containerPadding={[paddingWidth, 3]}
118-
showName={{bottom: showBody || showFooter ? 20 : 0}}
119-
$backgroundColor={headerStyle?.headerBackground || 'transparent'}
120-
style={{padding: headerStyle.containerHeaderPadding}}
121-
/>
122-
</BackgroundColorContext.Provider>
123-
)}
124-
{showBody && (
125-
<BackgroundColorContext.Provider value={bodyStyle.background}>
126-
<ScrollBar
127-
style={{
128-
height: container.autoHeight ? 'auto' : '100%',
129-
margin: '0px',
130-
padding: '0px',
131-
}}
132-
hideScrollbar={!scrollbars}
133-
>
109+
{showHeader && (
110+
<BackgroundColorContext.Provider value={headerStyle.headerBackground}>
111+
<HeaderInnerGrid
112+
{...otherHeaderProps}
113+
items={gridItemCompToGridItems(headerItems)}
114+
autoHeight={true}
115+
emptyRows={5}
116+
minHeight="46px"
117+
containerPadding={[paddingWidth, 3]}
118+
showName={{ bottom: showBody || showFooter ? 20 : 0 }}
119+
$backgroundColor={headerStyle?.headerBackground || 'transparent'}
120+
style={{padding: headerStyle.containerHeaderPadding}}
121+
122+
/>
123+
</BackgroundColorContext.Provider>
124+
)}
125+
{showBody && (
126+
<BackgroundColorContext.Provider value={bodyStyle.background}>
127+
<ScrollBar style={{ height: container.autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }} hideScrollbar={!scrollbars}>
134128
<BodyInnerGrid
135129
$showBorder={showHeader}
136130
{...otherBodyProps}
137131
items={gridItemCompToGridItems(bodyItems)}
138132
autoHeight={container.autoHeight}
139133
emptyRows={14}
140-
minHeight={showHeader ? '143px' : '142px'}
134+
minHeight={showHeader ? "143px" : "142px"}
141135
containerPadding={
142-
(showHeader && showFooter) || showHeader
143-
? [paddingWidth, 11.5]
144-
: [paddingWidth, 11]
136+
(showHeader && showFooter) || showHeader ? [paddingWidth, 11.5] : [paddingWidth, 11]
145137
}
146138
hintPlaceholder={props.hintPlaceholder ?? HintPlaceHolder}
147139
$backgroundColor={bodyStyle?.background || 'transparent'}
@@ -151,41 +143,31 @@ export function TriContainer(props: TriContainerProps) {
151143
/>
152144
</ScrollBar>
153145
</BackgroundColorContext.Provider>
154-
)}
155-
{showFooter && (
156-
<BackgroundColorContext.Provider value={footerStyle.footerBackground}>
157-
<FooterInnerGrid
158-
$showBorder={showHeader || showBody}
159-
{...otherFooterProps}
160-
items={gridItemCompToGridItems(footerItems)}
161-
autoHeight={true}
162-
emptyRows={5}
163-
minHeight={showBody ? '47px' : '46px'}
164-
containerPadding={
165-
showBody || showHeader ? [paddingWidth, 3.5] : [paddingWidth, 3]
166-
}
167-
showName={{top: showHeader || showBody ? 20 : 0}}
168-
$backgroundColor={footerStyle?.footerBackground || 'transparent'}
169-
$footerBackgroundImage={footerStyle?.footerBackgroundImage}
170-
$footerBackgroundImageRepeat={
171-
footerStyle?.footerBackgroundImageRepeat
172-
}
173-
$footerBackgroundImageSize={
174-
footerStyle?.footerBackgroundImageSize
175-
}
176-
$footerBackgroundImagePosition={
177-
footerStyle?.footerBackgroundImagePosition
178-
}
179-
$footerBackgroundImageOrigin={
180-
footerStyle?.footerBackgroundImageOrigin
181-
}
182-
$borderColor={style?.border}
183-
$borderWidth={style?.borderWidth}
184-
style={{padding: footerStyle.containerFooterPadding}}
185-
/>
186-
</BackgroundColorContext.Provider>
187-
)}
188-
</Wrapper>
146+
)}
147+
{showFooter && (
148+
<BackgroundColorContext.Provider value={footerStyle.footerBackground}>
149+
<FooterInnerGrid
150+
$showBorder={showHeader || showBody}
151+
{...otherFooterProps}
152+
items={gridItemCompToGridItems(footerItems)}
153+
autoHeight={true}
154+
emptyRows={5}
155+
minHeight={showBody ? "47px" : "46px"}
156+
containerPadding={showBody || showHeader ? [paddingWidth, 3.5] : [paddingWidth, 3]}
157+
showName={{ top: showHeader || showBody ? 20 : 0 }}
158+
$backgroundColor={footerStyle?.footerBackground || 'transparent'}
159+
$footerBackgroundImage={footerStyle?.footerBackgroundImage}
160+
$footerBackgroundImageRepeat={footerStyle?.footerBackgroundImageRepeat}
161+
$footerBackgroundImageSize={footerStyle?.footerBackgroundImageSize}
162+
$footerBackgroundImagePosition={footerStyle?.footerBackgroundImagePosition}
163+
$footerBackgroundImageOrigin={footerStyle?.footerBackgroundImageOrigin}
164+
$borderColor={style?.border}
165+
$borderWidth={style?.borderWidth}
166+
style={{padding: footerStyle.containerFooterPadding}}
167+
/>
168+
</BackgroundColorContext.Provider>
169+
)}
170+
</Wrapper>
189171
</div>
190172
);
191173
}

0 commit comments

Comments
 (0)