react-floating-whatsapp icon indicating copy to clipboard operation
react-floating-whatsapp copied to clipboard

Text is invisible on mobile phone

Open rampatra opened this issue 1 year ago • 3 comments

IMG_2168 Text becomes invisible in iPhone as shown above. It's fine on desktop browsers though.

Workaround for now:

<FloatingWhatsApp 
        accountName='ABC'
        phoneNumber='1234567890'
        style={{color: '#111111'}}    // <----- override color here
/>

rampatra avatar Mar 09 '24 12:03 rampatra

This maybe again happening due to styles clashing and, if this is the case, we can resolve this in a couple of ways:

  • Add !important to all css styles you have defined.
  • Provide override ability for all the elements like you have for the main div and main whatsapp button.
  • Wrap your React component in a secluded style context to prevent such a clash.

rampatra avatar Mar 09 '24 12:03 rampatra

I had the same issue in light mode. But I fix it by wrapping the component in a div and adding css styles to the div as you suggested @rampatra.

JuanPabloDiaz avatar Jul 15 '24 19:07 JuanPabloDiaz