Class: DimmerComponent
- Defined in:
- app/components/dimmer_component.rb
Overview
Dimmer — page/element overlay dimmer.
Usage:
Dimmer(active: true) { text "Dimmed content" }
Dimmer(inverted: true, active: true) {
Loader(active: true) { text "Loading..." }
}
Constant Summary
Constants inherited from Component
Instance Method Summary collapse
Methods inherited from Component
default, #initialize, #render_in, slot
Constructor Details
This class inherits a constructor from Component
Instance Method Details
#to_s ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/components/dimmer_component.rb', line 18 def to_s classes = class_names( "ui", { "active" => active, "inverted" => inverted, "blurring" => blurring, "simple" => simple, "page" => page }, "dimmer" ) content_el = @content.present? ? tag.div(class: "content") { @content } : nil tag.div(class: classes, data: { controller: "fui-dimmer" }) { content_el } end |