Check out example codes for "style message d'erreur css". It will help you in understanding the concepts better.

Code Example 1

.reponse { margin-bottom: 1.5em; padding: 1em; border: 2px solid; }
.error { background: #fbe3e4; color: #8a1f11; border-color: #fbc2c4; }
.notice { background: #fff6bf; color: #514721; border-color: #ffd324; }
.success { background: #e6efc2; color: #264409; border-color: #c6d880; }
.info { background: #d5edf8; color: #205791; border-color: #92cae4; }

Code Example 2

<div class="reponse">Exemple de message de réponse.</div>
<div class="reponse error">Oooops ! Exemple de message d'erreur.</div>
<div class="reponse notice">Attention ! Exemple de message d'alerte.</div>
<div class="reponse success">Bravo ! Exemple de message de succès.</div>
<div class="reponse info">Exemple de message d'information.</div>

Learn ReactJs, React Native from akashmittal.com