Alert
Hey you look over here!
Includes a Ruby component and corresponding Rails helper
RubyExample
Free ice cream!
Better be quick everyone.
<%= nk_alert do |a| %>
<%= nk_icon :"ice-cream-cone" %>
<%= a.title "Free ice cream!" %>
<%= a.description "Better be quick everyone." %>
<% end %>
Variants
nk_warning_alert
Get ready
Ice cream is in just a few minutes…
nk_success_alert
Free ice cream!
Grab them quick everyone.
nk_error_alert
No more ice cream
Ugh. I wanted one so bad
Usage
| ||
---|---|---|
Property | Default | Description |
variant | :default | One of :default / :warning / :error / :success |
**attrs | HTML attributes for <div> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <h5> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <button> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <button> element |