@@ -106,42 +106,34 @@ export function TriContainer(props: TriContainerProps) {
106
106
return (
107
107
< div style = { { padding : style . margin , height : '100%' } } >
108
108
< 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 } >
134
128
< BodyInnerGrid
135
129
$showBorder = { showHeader }
136
130
{ ...otherBodyProps }
137
131
items = { gridItemCompToGridItems ( bodyItems ) }
138
132
autoHeight = { container . autoHeight }
139
133
emptyRows = { 14 }
140
- minHeight = { showHeader ? ' 143px' : ' 142px' }
134
+ minHeight = { showHeader ? " 143px" : " 142px" }
141
135
containerPadding = {
142
- ( showHeader && showFooter ) || showHeader
143
- ? [ paddingWidth , 11.5 ]
144
- : [ paddingWidth , 11 ]
136
+ ( showHeader && showFooter ) || showHeader ? [ paddingWidth , 11.5 ] : [ paddingWidth , 11 ]
145
137
}
146
138
hintPlaceholder = { props . hintPlaceholder ?? HintPlaceHolder }
147
139
$backgroundColor = { bodyStyle ?. background || 'transparent' }
@@ -151,41 +143,31 @@ export function TriContainer(props: TriContainerProps) {
151
143
/>
152
144
</ ScrollBar >
153
145
</ 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 >
189
171
</ div >
190
172
) ;
191
173
}
0 commit comments