Class: Olivander::Components::SmallBoxComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Olivander::Components::SmallBoxComponent
- Defined in:
- app/components/olivander/components/small_box_component.rb
Instance Method Summary collapse
-
#initialize(background: 'bg-danger', primary_text: 'Loading...', secondary_text: " ".html_safe, icon: 'fas fa-sync-alt fa-spin', more_link: nil, more_text: '', more_icon: 'fas fa-arrow-circle-right', turbo_frame: nil, loading: true, src: nil, overlay: 'dark') ⇒ SmallBoxComponent
constructor
A new instance of SmallBoxComponent.
Constructor Details
#initialize(background: 'bg-danger', primary_text: 'Loading...', secondary_text: " ".html_safe, icon: 'fas fa-sync-alt fa-spin', more_link: nil, more_text: '', more_icon: 'fas fa-arrow-circle-right', turbo_frame: nil, loading: true, src: nil, overlay: 'dark') ⇒ SmallBoxComponent
Returns a new instance of SmallBoxComponent.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/components/olivander/components/small_box_component.rb', line 6 def initialize( background: 'bg-danger', primary_text: 'Loading...', secondary_text: " ".html_safe, icon: 'fas fa-sync-alt fa-spin', more_link: nil, more_text: '', more_icon: 'fas fa-arrow-circle-right', turbo_frame: nil, loading: true, src: nil, overlay: 'dark' ) super @background = background @primary_text = primary_text @secondary_text = secondary_text @icon = icon @more_link = more_link @more_text = more_text @more_icon = more_icon @turbo_frame = turbo_frame @loading = loading @src = src @overlay = end |