bh v0.0.16 Bh.Bh3.Button View Source
Twitter Bootstrap 3 button helpers for Phoenix.
Link to this section Summary
Link to this section Functions
Generates complex button HTML markup.
Options
:context- context of the button. Allowed values are:default,:primary,:success,:info,:warning,:danger,:link. Default context is:default.:id- id of the button.:size- size of the button. Supported sizes::large(alias:lg),:small(alias:sm) and:extra_small(alias:xs). By default the:sizeis not set (standard button size).:layout- layout of the button. Allowed:layoutvalue is:block. By default:layoutvalue is not set (renders standard button layout).:active- boolean. Iftrue- button is rendered withactiveclass, which gives appearance of the pressed button. Default isfalse.:disabled- boolean. Iftrue- button looks unclickable (faded). Default isfalse.
Examples
<%= bh_button "Button" %>
<button class="btn btn-default" type="button">Button</button>
You can pass only block of complex HTML without any options if needed.
<%= bh_button do %>
<span>Some content and <b>bold words</b></span>
<%= end %>
<button class="btn btn-default" type="button">
<span>Some content and <b>bold words</b></span>
</button>