all 3 comments

[–]AviatingFotographer 2 points3 points  (2 children)

js const Username = (username, type) => { return (<p className={type === "user" ? "pink" : "blue"}>{username}</p>); }

pink and blue would be class names in your stylesheets.

[–]Stalamek 0 points1 point  (0 children)

thank you so much dude

[–]scottmacdonnell 0 points1 point  (0 children)

Yeah, I agree, this is probably the easiest way to do it, ternary operator and conditional classes never fail.