Skip to content

Commit 05ebf9c

Browse files
authored
Fix/hint missing color (#1450)
* Fix * Fix color issue in Hint
1 parent 472e486 commit 05ebf9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/hint/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class Hint extends Component<HintProps, HintState> {
423423
// }
424424

425425
renderHintTip() {
426-
const {position, color} = this.props;
426+
const {position, color = DEFAULT_COLOR} = this.props;
427427
const source = this.useSideTip ? sideTip : middleTip;
428428
const flipVertically = position === HintPositions.TOP;
429429
const flipHorizontally = this.getTargetPositionOnScreen() === TARGET_POSITIONS.RIGHT;
@@ -433,7 +433,7 @@ class Hint extends Component<HintProps, HintState> {
433433

434434
return (
435435
<Image
436-
tintColor={color || DEFAULT_COLOR}
436+
tintColor={color}
437437
source={source}
438438
style={[styles.hintTip, this.getTipPosition(), flipStyle]}
439439
/>
@@ -447,7 +447,7 @@ class Hint extends Component<HintProps, HintState> {
447447
icon,
448448
iconStyle,
449449
borderRadius,
450-
color,
450+
color = DEFAULT_COLOR,
451451
customContent,
452452
removePaddings,
453453
enableShadow,
@@ -464,7 +464,7 @@ class Hint extends Component<HintProps, HintState> {
464464
styles.hint,
465465
!removePaddings && styles.hintPaddings,
466466
visible && enableShadow && styles.containerShadow,
467-
{backgroundColor: color},
467+
{backgroundColor: color},
468468
!_.isUndefined(borderRadius) && {borderRadius}
469469
]}
470470
ref={this.setHintRef}

0 commit comments

Comments
 (0)