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!
CodePudding user response:
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 />}