@@ -145,8 +145,10 @@ const SurfaceIOS = forwardRef<
145
145
...restStyle
146
146
} = ( StyleSheet . flatten ( style ) || { } ) as ViewStyle ;
147
147
148
- const [ filteredStyles , marginStyles ] = splitStyles ( restStyle , ( style ) =>
149
- style . startsWith ( 'margin' )
148
+ const [ filteredStyles , marginStyles , borderRadiusStyles ] = splitStyles (
149
+ restStyle ,
150
+ ( style ) => style . startsWith ( 'margin' ) ,
151
+ ( style ) => style . startsWith ( 'border' ) && style . endsWith ( 'Radius' )
150
152
) ;
151
153
152
154
if (
@@ -159,9 +161,12 @@ const SurfaceIOS = forwardRef<
159
161
) ;
160
162
}
161
163
164
+ const bgColor = backgroundColorStyle || backgroundColor ;
165
+
162
166
const outerLayerViewStyles = {
163
167
...getStyleForShadowLayer ( elevation , 0 ) ,
164
168
...marginStyles ,
169
+ ...borderRadiusStyles ,
165
170
position,
166
171
alignSelf,
167
172
top,
@@ -175,13 +180,15 @@ const SurfaceIOS = forwardRef<
175
180
height,
176
181
transform,
177
182
opacity,
183
+ backgroundColor : bgColor ,
178
184
} ;
179
185
180
186
const innerLayerViewStyles = {
181
187
...getStyleForShadowLayer ( elevation , 1 ) ,
182
188
...filteredStyles ,
189
+ ...borderRadiusStyles ,
183
190
flex : height ? 1 : undefined ,
184
- backgroundColor : backgroundColorStyle || backgroundColor ,
191
+ backgroundColor : bgColor ,
185
192
} ;
186
193
187
194
return [ outerLayerViewStyles , innerLayerViewStyles ] ;
0 commit comments