@@ -264,24 +264,17 @@ function UIView(props: {
264
264
width : '100%' ,
265
265
height : '100%' ,
266
266
margin : '0px' ,
267
- // padding:'0px',
268
267
padding : (
269
- rotationVal === null || rotationVal === undefined || restrictPaddingOnRotation
270
- ? '0px'
271
- : (
272
- boxShadowVal === null || boxShadowVal === undefined
273
- ? (
274
- rotationVal === '' || rotationVal === '0deg'
275
- ? '0px'
276
- : `calc(min(50%, ${ Math . min ( 50 , Math . abs ( rotationVal . replace ( 'deg' , '' ) ) / 90 ) * 100 } %)) 0px`
277
- )
278
- : (
279
- ( rotationVal === '' || rotationVal === '0deg' ) && ( boxShadowVal === '' || boxShadowVal === '0px' )
280
- ? '0px'
281
- : `calc(min(50%, ${ Math . min ( 50 , Math . abs ( rotationVal . replace ( 'deg' , '' ) ) / 90 ) * 100 } %)) 0px`
282
- )
283
- )
284
- )
268
+ ( rotationVal === null || rotationVal === undefined || restrictPaddingOnRotation ) &&
269
+ ( boxShadowVal === null || boxShadowVal === undefined || boxShadowVal === '0px' )
270
+ ) ? '0px' // Both rotation and box-shadow are empty or restricted
271
+ : rotationVal !== '' && rotationVal !== '0deg' // Rotation applied
272
+ ? ( boxShadowVal !== '' && boxShadowVal !== '0px' ) // Both rotation and box-shadow applied
273
+ ? `calc(min(50%, ${ Math . abs ( rotationVal . replace ( 'deg' , '' ) + parseFloat ( boxShadowVal . replace ( 'px' , '' ) ) ) / 90 } * 100%)) 0px`
274
+ : `calc(min(50%, ${ Math . abs ( rotationVal . replace ( 'deg' , '' ) ) / 90 } * 100%)) 0px` // Only rotation applied
275
+ : boxShadowVal !== '' && boxShadowVal !== '0px' // Box-shadow applied
276
+ ? `calc(min(50%, ${ Math . abs ( parseFloat ( boxShadowVal . replace ( 'px' , '' ) ) ) / 90 } * 100%)) 0px`
277
+ : '0px' // Default value if neither rotation nor box-shadow is applied
285
278
} }
286
279
>
287
280
< HidableView hidden = { childrenProps . hidden as boolean } >
0 commit comments