Skip to content

Commit 5c333da

Browse files
committed
formating removed-83
1 parent 295ebdd commit 5c333da

File tree

1 file changed

+34
-51
lines changed

1 file changed

+34
-51
lines changed

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

Lines changed: 34 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -76,33 +76,19 @@ ${props=>props.$animationStyle&&props.$animationStyle}
7676
display: flex;
7777
flex-flow: column;
7878
height: 100%;
79-
border: ${(props) => props.$style.borderWidth} solid
80-
${(props) => props.$style.border};
79+
border: ${(props) => props.$style.borderWidth} solid ${(props) => props.$style.border};
8180
border-radius: ${(props) => props.$style.radius};
8281
background-color: ${(props) => props.$style.background};
8382
padding: ${(props) => props.$style.padding};
8483
margin: ${(props) => props.$style.margin};
85-
${(props) =>
86-
props.$style.backgroundImage &&
87-
`background-image: url(${props.$style.backgroundImage});`}
88-
${(props) =>
89-
props.$style.backgroundImageRepeat &&
90-
`background-repeat: ${props.$style.backgroundImageRepeat};`}
91-
${(props) =>
92-
props.$style.backgroundImageSize &&
93-
`background-size: ${props.$style.backgroundImageSize};`}
94-
${(props) =>
95-
props.$style.backgroundImagePosition &&
96-
`background-position: ${props.$style.backgroundImagePosition};`}
97-
${(props) =>
98-
props.$style.backgroundImageOrigin &&
99-
`background-origin: ${props.$style.backgroundImageOrigin};`}
84+
${(props) => props.$style.backgroundImage && `background-image: url(${props.$style.backgroundImage});`}
85+
${(props) => props.$style.backgroundImageRepeat && `background-repeat: ${props.$style.backgroundImageRepeat};`}
86+
${(props) => props.$style.backgroundImageSize && `background-size: ${props.$style.backgroundImageSize};`}
87+
${(props) => props.$style.backgroundImagePosition && `background-position: ${props.$style.backgroundImagePosition};`}
88+
${(props) => props.$style.backgroundImageOrigin && `background-origin: ${props.$style.backgroundImageOrigin};`}
10089
`;
10190

102-
const FloatTextWrapper = styled.div<{
103-
$style: TextStyleType;
104-
$horizontalAlignment: any;
105-
}>`
91+
const FloatTextWrapper = styled.div<{ $style: TextStyleType, $horizontalAlignment : any }>`
10692
${(props) => props.$style && getStyle(props.$style)}
10793
text-align: ${(props) => props.$horizontalAlignment};
10894
padding: ${(props) => props.$style.padding};
@@ -190,25 +176,26 @@ export function TriContainer(props: TriContainerProps) {
190176
return (
191177
<Wrapper $style={style} $animationStyle={animationStyle}>
192178
{showHeader && (
193-
<BackgroundColorContext.Provider value={container.style.background}>
179+
<BackgroundColorContext.Provider
180+
value={container.style.background}
181+
>
194182
<HeaderInnerGrid
195183
{...otherHeaderProps}
196-
items={gridItemCompToGridItems(headerItems)}
197-
autoHeight={true}
198-
emptyRows={5}
199-
minHeight="46px"
200-
containerPadding={[0, 0]}
201-
showName={{bottom: showFooter ? 20 : 0}}
202-
$backgroundColor={headerStyle?.headerBackground || 'transparent'}
203-
style={{padding: headerStyle.containerHeaderPadding}}
204-
/>
184+
items={gridItemCompToGridItems(headerItems)}
185+
autoHeight={true}
186+
emptyRows={5}
187+
minHeight="46px"
188+
containerPadding={[0, 0]}
189+
showName={{ bottom: showFooter ? 20 : 0 }}
190+
$backgroundColor={headerStyle?.headerBackground || "transparent"}
191+
style={{ padding: headerStyle.containerHeaderPadding }} />
205192
</BackgroundColorContext.Provider>
206193
)}
207194
{showBody && (
208195
<BackgroundColorContext.Provider value={container.style.background}>
209196
<div
210197
style={{
211-
overflowY: 'scroll',
198+
overflowY: "scroll",
212199
background: `${container.style.background}`,
213200
}}
214201
>
@@ -218,25 +205,25 @@ export function TriContainer(props: TriContainerProps) {
218205
items={gridItemCompToGridItems(bodyItems)}
219206
autoHeight={container.autoHeight}
220207
emptyRows={14}
221-
minHeight={showHeader ? '143px' : '142px'}
208+
minHeight={showHeader ? "143px" : "142px"}
222209
containerPadding={[0, 0]}
223210
hintPlaceholder={props.hintPlaceholder ?? HintPlaceHolder}
224-
$backgroundColor={bodyStyle?.background || 'transparent'}
211+
$backgroundColor={bodyStyle?.background || "transparent"}
225212
$borderColor={style?.border}
226213
$borderWidth={style?.borderWidth}
227214
style={{
228215
float: `${props.float}`,
229-
width: `${props.float === 'none' ? '100%' : `${props.width}%`}`,
230-
height: '100%',
216+
width: `${props.float === "none" ? "100%" : `${props.width}%`}`,
217+
height: "100%",
231218
...container.bodyStyle,
232219
}}
233-
/>
220+
/>
234221
<FloatTextWrapper
235222
$style={props.style}
236223
$horizontalAlignment={props.horizontalAlignment}
237224
>
238225
<p>
239-
{props.type === 'markdown' ? (
226+
{props.type === "markdown" ? (
240227
<TacoMarkDown>{text.value}</TacoMarkDown>
241228
) : (
242229
text.value
@@ -247,28 +234,24 @@ export function TriContainer(props: TriContainerProps) {
247234
</BackgroundColorContext.Provider>
248235
)}
249236
{showFooter && (
250-
<BackgroundColorContext.Provider value={container.style.background}>
237+
<BackgroundColorContext.Provider
238+
value={container.style.background}
239+
>
251240
<FooterInnerGrid
252241
$showBorder={showHeader}
253242
{...otherFooterProps}
254243
items={gridItemCompToGridItems(footerItems)}
255244
autoHeight={true}
256245
emptyRows={5}
257-
minHeight={'48px'}
246+
minHeight={"48px"}
258247
containerPadding={[0, 0]}
259-
showName={{top: showHeader ? 20 : 0}}
260-
$backgroundColor={footerStyle?.footerBackground || 'transparent'}
248+
showName={{ top: showHeader ? 20 : 0 }}
249+
$backgroundColor={footerStyle?.footerBackground || "transparent"}
261250
$footerBackgroundImage={footerStyle?.footerBackgroundImage}
262-
$footerBackgroundImageRepeat={
263-
footerStyle?.footerBackgroundImageRepeat
264-
}
251+
$footerBackgroundImageRepeat={footerStyle?.footerBackgroundImageRepeat}
265252
$footerBackgroundImageSize={footerStyle?.footerBackgroundImageSize}
266-
$footerBackgroundImagePosition={
267-
footerStyle?.footerBackgroundImagePosition
268-
}
269-
$footerBackgroundImageOrigin={
270-
footerStyle?.footerBackgroundImageOrigin
271-
}
253+
$footerBackgroundImagePosition={footerStyle?.footerBackgroundImagePosition}
254+
$footerBackgroundImageOrigin={footerStyle?.footerBackgroundImageOrigin}
272255
$borderColor={style?.border}
273256
$borderWidth={style?.borderWidth}
274257
style={{padding: footerStyle.containerFooterPadding}}

0 commit comments

Comments
 (0)