bh v0.0.16 Bh.Bh3.Panel View Source

Twitter Bootstrap 3 panel helpers for Phoenix.

Link to this section Summary

Functions

Generates panel HTML markup

Link to this section Functions

Generates panel HTML markup

Options

  • :heading - heading of the panel. By default heading is not rendered.

  • :title - heading of the panel, which gets rendered inside

    tag with overriden styles.

  • :footer - footer of the panel. By default is not rendered.

  • :context - context of the panel. Default one is :default. Supported contexts are :default, :primary, :success, :info, :warning, :danger.

Examples

Simple panel:

<%= bh_panel "Panel text" %>
<div class="panel panel-default">
  <div class="panel-body">Panel text</div>
</div>

Panel with title:

<%= bh_panel "Panel text", heading: "Panel heading" %>
<div class="panel panel-default">
  <div class="panel-heading">Panel heading</div>
  <div class="panel-body">
    Panel text
  </div>
</div>

Panel with footer:

<%= bh_panel "Panel content", footer: "Panel footer" %>
<div class="panel panel-default">
  <div class="panel-body">
    Panel content
  </div>
  <div class="panel-footer">Panel footer</div>
</div>