Skip to content

Commit e818a27

Browse files
adding background styles in container
1 parent f341397 commit e818a27

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ const getStyle = (style: ContainerStyleType) => {
1818
padding: ${style.padding};
1919
// width: ${widthCalculator(style.margin)};
2020
// height: ${heightCalculator(style.margin)};
21+
${style.background && `background-color: ${style.background};`}
22+
${style.backgroundImage && `background-image: ${style.backgroundImage};`}
23+
${style.backgroundImageRepeat && `background-repeat: ${style.backgroundImageRepeat};`}
24+
${style.backgroundImageSize && `background-size: ${style.backgroundImageSize};`}
25+
${style.backgroundImagePosition && `background-position: ${style.backgroundImagePosition};`}
26+
${style.backgroundImageOrigin && `background-origin: ${style.backgroundImageOrigin};`}
2127
`;
2228
};
2329

@@ -130,7 +136,7 @@ export function TriContainer(props: TriContainerProps) {
130136
minHeight="46px"
131137
containerPadding={[paddingWidth, 3]}
132138
showName={{ bottom: showBody || showFooter ? 20 : 0 }}
133-
$backgroundColor={headerStyle?.headerBackground}
139+
$backgroundColor={headerStyle?.headerBackground || 'transparent'}
134140
$headerBackgroundImage={headerStyle?.headerBackgroundImage}
135141
$headerBackgroundImageRepeat={headerStyle?.headerBackgroundImageRepeat}
136142
$headerBackgroundImageSize={headerStyle?.headerBackgroundImageSize}
@@ -154,7 +160,7 @@ export function TriContainer(props: TriContainerProps) {
154160
(showHeader && showFooter) || showHeader ? [paddingWidth, 11.5] : [paddingWidth, 11]
155161
}
156162
hintPlaceholder={props.hintPlaceholder ?? HintPlaceHolder}
157-
$backgroundColor={bodyStyle?.background}
163+
$backgroundColor={bodyStyle?.background || 'transparent'}
158164
$borderColor={style?.border}
159165
$borderWidth={style?.borderWidth}
160166
$backgroundImage={bodyStyle?.backgroundImage}
@@ -177,7 +183,7 @@ export function TriContainer(props: TriContainerProps) {
177183
minHeight={showBody ? "47px" : "46px"}
178184
containerPadding={showBody || showHeader ? [paddingWidth, 3.5] : [paddingWidth, 3]}
179185
showName={{ top: showHeader || showBody ? 20 : 0 }}
180-
$backgroundColor={footerStyle?.footerBackground}
186+
$backgroundColor={footerStyle?.footerBackground || 'transparent'}
181187
$footerBackgroundImage={footerStyle?.footerBackgroundImage}
182188
$footerBackgroundImageRepeat={footerStyle?.footerBackgroundImageRepeat}
183189
$footerBackgroundImageSize={footerStyle?.footerBackgroundImageSize}

0 commit comments

Comments
 (0)