Last active
February 22, 2018 14:38
-
-
Save OussaZaki/44f4f8ae84948cb5cdf71955220ce93e to your computer and use it in GitHub Desktop.
Conditional Rendering - Alert Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Alert(props) { | |
if (!props.showAlert) { | |
return null; | |
} | |
return ( | |
<div className={props.type}> | |
<h4>{props.title}</h4> | |
<p>{props.summary}</p> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment