@@ -238,21 +238,16 @@ const Surface = forwardRef<View, Props>(
238
238
...restStyle
239
239
} = ( StyleSheet . flatten ( style ) || { } ) as ViewStyle ;
240
240
241
- const [ filteredStyle , borderRadiusStyle , marginStyle ] = splitStyles (
242
- restStyle ,
243
- ( style ) => style . startsWith ( 'border' ) && style . endsWith ( 'Radius' ) ,
244
- ( style ) => style . startsWith ( 'margin' )
241
+ const [ filteredStyle , marginStyle ] = splitStyles ( restStyle , ( style ) =>
242
+ style . startsWith ( 'margin' )
245
243
) ;
246
244
247
- const sharedStyles = {
248
- flex : height ? 1 : undefined ,
249
- } ;
250
-
251
245
const innerLayerViewStyles = [
252
246
filteredStyle ,
253
- sharedStyles ,
254
- borderRadiusStyle ,
255
- { backgroundColor : backgroundColorStyle || backgroundColor } ,
247
+ {
248
+ flex : height ? 1 : undefined ,
249
+ backgroundColor : backgroundColorStyle || backgroundColor ,
250
+ } ,
256
251
] ;
257
252
258
253
const outerLayerViewStyles = {
@@ -303,16 +298,10 @@ const Surface = forwardRef<View, Props>(
303
298
testID = { `${ testID } -outer-layer` }
304
299
>
305
300
< Animated . View
306
- style = { [ getStyleForAnimatedShadowLayer ( 1 ) , sharedStyles ] }
307
- testID = { ` ${ testID } -middle-layer` }
301
+ style = { [ getStyleForAnimatedShadowLayer ( 1 ) , innerLayerViewStyles ] }
302
+ testID = { testID }
308
303
>
309
- < Animated . View
310
- { ...props }
311
- testID = { testID }
312
- style = { innerLayerViewStyles }
313
- >
314
- { children }
315
- </ Animated . View >
304
+ { children }
316
305
</ Animated . View >
317
306
</ Animated . View >
318
307
) ;
@@ -339,16 +328,11 @@ const Surface = forwardRef<View, Props>(
339
328
testID = { `${ testID } -outer-layer` }
340
329
>
341
330
< Animated . View
342
- style = { [ getStyleForShadowLayer ( 1 ) , sharedStyles ] }
343
- testID = { `${ testID } -middle-layer` }
331
+ { ...props }
332
+ style = { [ getStyleForShadowLayer ( 1 ) , innerLayerViewStyles ] }
333
+ testID = { testID }
344
334
>
345
- < Animated . View
346
- { ...props }
347
- testID = { testID }
348
- style = { innerLayerViewStyles }
349
- >
350
- { children }
351
- </ Animated . View >
335
+ { children }
352
336
</ Animated . View >
353
337
</ Animated . View >
354
338
) ;
0 commit comments