File tree 1 file changed +13
-12
lines changed
client/packages/lowcoder/src/comps/generators
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -257,17 +257,7 @@ function UIView(props: {
257
257
boxShadowVal = defaultChildren . style ?. children ?. boxShadow ?. valueAndMsg ?. value ;
258
258
restrictPaddingOnRotationVal = defaultChildren ?. restrictPaddingOnRotation ?. valueAndMsg ?. value ;
259
259
}
260
- return (
261
- < div
262
- ref = { props . innerRef }
263
- className = { childrenProps . className as string }
264
- data-testid = { childrenProps . dataTestId as string }
265
- style = { {
266
- width : '100%' ,
267
- height : '100%' ,
268
- margin : '0px' ,
269
- padding :
270
- ( rotationVal === null ||
260
+ const getPadding = ( ) => ( rotationVal === null ||
271
261
rotationVal === undefined ||
272
262
restrictPaddingOnRotation ) &&
273
263
( boxShadowVal === null ||
@@ -300,7 +290,18 @@ function UIView(props: {
300
290
? '0px'
301
291
: boxShadowVal !== '' && boxShadowVal !== '0px' // Box-shadow applied
302
292
? `calc(min(50%, ${ Math . abs ( parseFloat ( boxShadowVal . replace ( 'px' , '' ) ) ) / 90 } * 100%)) 0px`
303
- : '0px' , // Default value if neither rotation nor box-shadow is applied
293
+ : '0px' // Default value if neither rotation nor box-shadow is applied
294
+ return (
295
+ < div
296
+ ref = { props . innerRef }
297
+ className = { childrenProps . className as string }
298
+ data-testid = { childrenProps . dataTestId as string }
299
+ style = { {
300
+ width : '100%' ,
301
+ height : '100%' ,
302
+ margin : '0px' ,
303
+ padding :getPadding ( )
304
+
304
305
} }
305
306
>
306
307
< HidableView hidden = { childrenProps . hidden as boolean } >
You can’t perform that action at this time.
0 commit comments