@@ -141,8 +141,10 @@ const SurfaceIOS = forwardRef<
141
141
...restStyle
142
142
} = ( StyleSheet . flatten ( style ) || { } ) as ViewStyle ;
143
143
144
- const [ filteredStyle , marginStyle ] = splitStyles ( restStyle , ( style ) =>
145
- style . startsWith ( 'margin' )
144
+ const [ filteredStyle , marginStyle , borderRadiusStyle ] = splitStyles (
145
+ restStyle ,
146
+ ( style ) => style . startsWith ( 'margin' ) ,
147
+ ( style ) => style . startsWith ( 'border' ) && style . endsWith ( 'Radius' )
146
148
) ;
147
149
148
150
if (
@@ -155,9 +157,12 @@ const SurfaceIOS = forwardRef<
155
157
) ;
156
158
}
157
159
160
+ const bgColor = backgroundColorStyle || backgroundColor ;
161
+
158
162
const outerLayerViewStyles = {
159
163
...getStyleForShadowLayer ( elevation , 0 ) ,
160
164
...marginStyle ,
165
+ ...borderRadiusStyle ,
161
166
position,
162
167
alignSelf,
163
168
top,
@@ -171,13 +176,15 @@ const SurfaceIOS = forwardRef<
171
176
height,
172
177
transform,
173
178
opacity,
179
+ backgroundColor : bgColor ,
174
180
} ;
175
181
176
182
const innerLayerViewStyles = {
177
183
...getStyleForShadowLayer ( elevation , 1 ) ,
184
+ ...borderRadiusStyle ,
178
185
...filteredStyle ,
179
186
flex : height ? 1 : undefined ,
180
- backgroundColor : backgroundColorStyle || backgroundColor ,
187
+ backgroundColor : bgColor ,
181
188
} ;
182
189
183
190
return [ outerLayerViewStyles , innerLayerViewStyles ] ;
0 commit comments