phoenix
phoenix copied to clipboard
Add flash function component to mix phx.new generator.
The idea is to have a function component to flash
messages, so when no messages are present, we avoid printing an empty <p>
tag.
<!-- input -->
<.flash type="info" message="User created." />
<!-- output -->
<p class="alert alert-info" role="alert">User created.</p>