Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline Style not working #314

Open
gowdruNikhil opened this issue Jan 29, 2021 · 3 comments
Open

Inline Style not working #314

gowdruNikhil opened this issue Jan 29, 2021 · 3 comments

Comments

@gowdruNikhil
Copy link

gowdruNikhil commented Jan 29, 2021

<p> Add <span style="color:green">₹56</span> more to cart for <span style="color:green">FREE</span> Delivery</p>

the color green is not applying on the span tagged elements

@rianfloo
Copy link

Not very elegant but I tricked it by recreating a custom node with the data inside.

Hope it will help few other like me :)

 if (node.name == 'span') {
      const data = node.children[0].data;
      const width = Dimensions.get('window').width;
      return (
          <View key={index} style={{ backgroundColor: 'red', borderRadius: 12, padding: 14, width: width - 24 }}>
              <Text style={{color: '#FFFFFF', fontSize: 14, lineHeight: 24}} >
                  {data}
              </Text>
          </View>
      )
} 

@KarthikBaleneni
Copy link

Please provide an version update with this Fix.

@tuanphamhnl
Copy link

Do we have any updates? Please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants