Method: Pajamas::SpinnerComponent#initialize
- Defined in:
- app/components/pajamas/spinner_component.rb
#initialize(color: :dark, inline: false, label: _("Loading"), size: :sm, **html_options) ⇒ SpinnerComponent
Returns a new instance of SpinnerComponent.
12 13 14 15 16 17 18 |
# File 'app/components/pajamas/spinner_component.rb', line 12 def initialize(color: :dark, inline: false, label: _("Loading"), size: :sm, **) @color = filter_attribute(color.to_sym, COLOR_OPTIONS) @inline = inline @label = label.presence @size = filter_attribute(size.to_sym, SIZE_OPTIONS) @html_options = end |