File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -545,22 +545,29 @@ export class Label extends LabelBase {
545
545
546
546
// we need to pass color because initWithDataOptionsDocumentAttributesError
547
547
// will set a default color preventing the UITextView from applying its color
548
+
549
+ const color = this . color ? ( this . color instanceof Color ? this . color : new Color ( this . color ) ) : undefined ;
548
550
const params = {
549
551
text : this . html ,
550
552
fontSize,
551
553
familyName,
552
554
fontWeight : fontWeight as any ,
553
- color : this . color ,
555
+ color,
554
556
letterSpacing : this . letterSpacing ,
555
557
lineHeight : this . lineHeight ,
556
558
textAlignment : nativeView . textAlignment
557
559
} ;
558
560
if ( ! this . isUsingUITextView ) {
561
+ const linkColor = this . linkColor
562
+ ? this . linkColor instanceof Color
563
+ ? this . linkColor
564
+ : new Color ( this . linkColor )
565
+ : undefined ;
559
566
Object . assign ( params , {
560
567
useCustomLinkTag : true ,
561
568
lineBreak : ( nativeView as UILabel ) . lineBreakMode ,
562
569
linkDecoration : this . linkUnderline ? 'underline' : undefined ,
563
- linkColor : this . linkColor
570
+ linkColor
564
571
} ) ;
565
572
}
566
573
const result = createNativeAttributedString (
You can’t perform that action at this time.
0 commit comments