An warware: canza launi na yajin aiki ta hanyar layin rubutu cikin amsawa ta asali

Babban matsalar canza launin yajin aiki ta hanyar layin rubutu a cikin React Native shine cewa yana iya zama da wahala a cimma tasirin da ake so.

I have a text component in React Native and I want to change the color of the strike through line. How can I do this?


A:

You can use the <code>textDecorationColor</code> style property: https://facebook.github.io/react-native/docs/text-style-props#textdecorationcolor
<code>&lt;Text style={{ textDecorationLine: 'line-through', textDecorationColor: 'red' }}&gt;Hello world!&lt;/Text&gt;</code>

Amsa Tasirin Rubutun ฦ˜asa ta Amfani da StyleSheet

A cikin React Native, zaku iya amfani da salon Sheet na ษ“angaren Rubutun don amfani da salo ga rubutu.

Don amfani da kayan salon Sheet, da farko kuna buฦ™atar ฦ™irฦ™irar abu StyleSheet. Bayan haka, zaku iya amfani da kayan styleSheet don amfani da salo ga rubutu.

Anan ga misalin yadda ake amfani da kayan styleSheet don amfani da salo ga rubutu a cikin React Native:

Wannan wani rubutu ne mai salo

Shafi posts:

Leave a Comment