Class: Olivander::Components::PortletComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/olivander/components/portlet_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(title, *args) ⇒ PortletComponent

Returns a new instance of PortletComponent.



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/components/olivander/components/portlet_component.rb', line 9

def initialize(title, *args)
  super
  @title = title
  options = args.extract_options!
  @card_type = options[:card_type] || 'card-default'
  @background = options[:background]
  @header_background = options[:header_background]
  @turbo_frame = options[:turbo_frame]
  @src = options[:src]
  @loading = options[:loading]
  @card_data = options[:card_data]
  @turbo_frame_data = options[:turbo_frame_data]
end