<%= link_to('Bootstrap Documentation', 'http://twitter.github.io/bootstrap/components.html#labels-badges') %>
<%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/StampHelper') %>
We use stamp
because label
is a Rails Helper method.
Label | Code |
---|---|
<%= stamp('Default') %> |
stamp('Default')
|
<%= stamp('Success', :success) %> |
stamp('Success', :success)
|
<%= stamp('Warning', :warning) %> |
stamp('Warning', :warning)
|
<%= stamp('Important', :important) %> |
stamp('Important', :important)
|
<%= stamp('Info', :info) %> |
stamp('Info', :info)
|
<%= stamp('Inverse', :inverse) %> |
stamp('Inverse', :inverse)
|
Options |
stamp('Success', :success, id: 'success-label', key: 'value')
|
<%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/BadgeHelper') %>
Badge | Code |
---|---|
<%= badge('1') %> |
badge('1')
|
<%= badge('2', :success) %> |
badge('2', :success)
|
<%= badge('3', :warning) %> |
badge('3', :warning)
|
<%= badge('4', :important) %> |
badge('4', :important)
|
<%= badge('5', :info) %> |
badge('5', :info)
|
<%= badge('10', :inverse) %> |
badge('10', :inverse)
|
Options |
badge('Success', :success, id: 'success-badge', key: 'value')
|