README.md in bootstrap-view-helpers-0.0.9 vs README.md in bootstrap-view-helpers-0.0.10
- old
+ new
@@ -26,10 +26,11 @@
* split-button dropdowns
* accordion
* form helpers
* submit_tag_button
* cancel_tag_button
+ * alerts
## Note
This is a new gem undergoing a lot of change. There is a chance that some backwards
compatibility will be broken until things settle down.
@@ -253,5 +254,30 @@
cancel_button_tag('Go Back', url: '/')
cancel_button_tag(:info, url: '/')
cancel_button_tag(:large, url: '/')
cancel_button_tag('Return', :small, :warning, url: '/', id: 'my-id')
```
+
+### Alerts
+
+[Bootstrap Documentation](http://twitter.github.io/bootstrap/components.html#alerts)
+[API Documentation](http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/AlertHelper)
+
+```erb
+<%= alert('Default Alert') %>
+<%= alert('Type :info', :info) %>
+<%= alert('Type :success', :success) %>
+<%= alert('Type :error', :error) %>
+
+<%= alert('Default alert with heading', heading: 'Warning!') %>
+<%= alert('No close button', close: false) %>
+<%= alert("Type :block gives some more padding", :block ) %>
+<%= alert("Unknown options are html attributes", id: 'my-id', class: 'my-class') %>
+
+<%= alert :success do %>
+ <%= alert_heading('A List') %>
+ <ul>
+ <li>One</li>
+ <li>Two</li>
+ </ul>
+<% end %>
+```
\ No newline at end of file