React-native: how to put line through text ?

Created on 8 Apr 2015  路  8Comments  路  Source: facebook/react-native

not support css :

text-decoration: line-through;

This function is how to achieve ?

Locked

Most helpful comment

In react-native you can use :
textDecorationLine: 'line-through'

All 8 comments

Help!Help!

Not all css is available for use, yet.

You can implement your own custom component for this until it's added in to core: strike through on UILabel and how to create your own components for react-native

@brentvatne thanks

This could be trivially added the same way as in https://github.com/facebook/react-native/pull/482 with NSStrikethroughStyleAttributeName attribute

I contribute the code and made a pull request https://github.com/facebook/react-native/pull/845#

Wait for FB merge.

@KJlmfe - thanks, closing this issue as the discussion as moved to the PR now :smile:

In react-native you can use :
textDecorationLine: 'line-through'

Was this page helpful?
0 / 5 - 0 ratings