Class: Www::FloorplanCategoryComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/www/floorplan_category_component.rb

Overview

ViewComponent: renders the floorplan category block.

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#cms_link, #fetch_or_fallback, #image_asset_tag, #image_tag, #number_to_currency, #number_with_delimiter, #post_path, #post_url, #strip_tags

Constructor Details

#initialize(section_title:, rooms:, description: nil, view_more_title: nil, view_more_href: nil, col_size: 'col-6 col-lg-4 col-xl-3 mb-4 d-flex', link_prefix: nil, mode: :floor_heating, show_smartplan_cta: true) ⇒ FloorplanCategoryComponent

Returns a new instance of FloorplanCategoryComponent.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/components/www/floorplan_category_component.rb', line 5

def initialize(section_title:, rooms:, description: nil, view_more_title: nil, view_more_href: nil, col_size: 'col-6 col-lg-4 col-xl-3 mb-4 d-flex', link_prefix: nil, mode: :floor_heating, show_smartplan_cta: true)
  super()
  @section_title = section_title
  @rooms = rooms
  @description = description
  @view_more_title = view_more_title
  @view_more_href = view_more_href
  @col_size = col_size
  @link_prefix = link_prefix
  @mode = (mode || :floor_heating).to_sym
  @show_smartplan_cta = show_smartplan_cta
end