Skip to content

Commit 4accb01

Browse files
authored
Fix issue with Card's backgroundColor not working (#1279)
* Fix issue with Card's backgroundColor not working * Code review fixes
1 parent e949f07 commit 4accb01

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/card/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@ class Card extends PureComponent<PropTypes, State> {
194194
}
195195
}
196196

197-
get blurBgStyle() {
198-
const {enableBlur} = this.props;
197+
get backgroundStyle() {
198+
const {enableBlur, backgroundColor = Colors.white} = this.props;
199199

200200
if (Constants.isIOS && enableBlur) {
201-
return {backgroundColor: Colors.rgba(Colors.white, 0.85)};
201+
return {backgroundColor: Colors.rgba(backgroundColor, 0.85)};
202202
} else {
203-
return {backgroundColor: Colors.white};
203+
return {backgroundColor};
204204
}
205205
}
206206

@@ -299,7 +299,7 @@ class Card extends PureComponent<PropTypes, State> {
299299
{borderRadius: brRadius},
300300
this.elevationStyle,
301301
this.shadowStyle,
302-
this.blurBgStyle,
302+
this.backgroundStyle,
303303
containerStyle,
304304
style
305305
]}

0 commit comments

Comments
 (0)