Issue
I am trying to change color of the variable of the logged in username.
userData.name is a simple string returned from the API:
The issue is how it looks on the UI (you can barely see the name because it has black font):
Does anyone know how to add styles to userData.name variable so that it changes the font to white or some other color?
Thank you!
Solution
try to wrap it in a paragraph or something similar and then you can style that element
{auth ? (<p style={{color: 'white'}}>{userData.name}</p>) : <Button />}
Answered By - Sergiu


0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.