I have a component that displays text messages in <p></p>
tags based on specific conditions:
const StatusBar = ({ currentPlayer }) => {
return (
<div className="status-bar-container">
<p>
{currentPlayer?.color === Colors.BLACK
? "⚫️ Black player's turn"
: "⚪️ White player's turn"}
</p>
</div>
)
}
Is there a way to create a smooth transition animation between the first message ('Black player's turn') and the second message ('White player's turn') using CSS/SCSS or some react animation libraries?