alert
component, implemented in Ruby. Use it like any other matestack component in your apps, pages and components. It offers customizable options to simply achieve what is possible in bootstrap with this component. See below for more information about the possible options.bs_alert(*args, &block)
:variant
- Specify a variant for the alert. Variant represent bootstraps contextual classes and can have one of the following values: :primary, :secondary, :success, :info, :warning, :info, :light, :dark
or your custom contextual class. The default is :primary
:title
- Expects a string specifying the content of the heading.:title_size
- Set a different heading size. By default it is set to 4 corresponding to a "h4".:text
- Passing content as String for alert. If a text and block is given, the block will be rendered below the text.:dismissible
- Expects a boolean value. If set to true
, a close button to dismiss the alert will be displayed.:animated
- Expects a boolean value. If set to true
the alert will be animated if dismissed. By default, it is set as false
.:close_on
- Expects an event as string on which the alert will be closed calling bootstraps close
method.:dispose_on
- Expects an event as string on which the alert will be disposed calling bootstraps dispose
method.&block
- Use a block to create custom content/markup inside an alert. If used together with :text
the text will be displayed before the block.