ဖြေရှင်းထားသည်- တုံ့ပြန်မှု မူရင်းရှိ စာသားမျဉ်းမှတဆင့် သပိတ်အရောင်ကို ပြောင်းပါ။

React Native တွင် စာသားမျဉ်းများမှတစ်ဆင့် လုပ်ကြံမှုတစ်ခု၏အရောင်ကို ပြောင်းလဲခြင်း၏ အဓိကပြဿနာမှာ လိုချင်သောအကျိုးသက်ရောက်မှုကို ရရှိရန် ခက်ခဲနိုင်သည်။

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>

StyleSheet ကို အသုံးပြု၍ မူရင်း Strikethrough Text ကို တုံ့ပြန်ပါ။

React Native တွင်၊ သင်သည် စာသားပုံစံများကို အသုံးပြုရန် စာသားအစိတ်အပိုင်းတစ်ခု၏ styleSheet ပိုင်ဆိုင်မှုကို အသုံးပြုနိုင်သည်။

styleSheet ပိုင်ဆိုင်မှုကို အသုံးပြုရန်၊ သင်သည် ပထမဦးစွာ StyleSheet အရာဝတ္ထုတစ်ခုကို ဖန်တီးရန် လိုအပ်သည်။ ထို့နောက်၊ သင်သည် စာသားတွင် စတိုင်များကို အသုံးပြုရန် styleSheet ပိုင်ဆိုင်မှုကို အသုံးပြုနိုင်သည်။

ဤသည်မှာ React Native ရှိ စာသားသို့ စတိုင်များကို အသုံးပြုရန် styleSheet ပိုင်ဆိုင်မှုကို အသုံးပြုနည်း ဥပမာတစ်ခုဖြစ်သည်။

ဤသည်မှာ ပုံစံများဖြင့် စာသားအချို့ဖြစ်သည်။

Related ရေးသားချက်များ:

a Comment ချန်ထား