Class: Www::ShowcaseGridComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Www::ShowcaseGridComponent
- Defined in:
- app/components/www/showcase_grid_component.rb
Constant Summary collapse
- DEFAULT_ICON =
'images'
Instance Method Summary collapse
-
#initialize(section_title:, showcases:, section_icon: nil, description: nil, view_more_title: nil, view_more_href: nil, col_size: 'col-12 col-sm-4 col-lg-3 mb-4', border: nil) ⇒ ShowcaseGridComponent
constructor
A new instance of ShowcaseGridComponent.
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:, showcases:, section_icon: nil, description: nil, view_more_title: nil, view_more_href: nil, col_size: 'col-12 col-sm-4 col-lg-3 mb-4', border: nil) ⇒ ShowcaseGridComponent
Returns a new instance of ShowcaseGridComponent.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/components/www/showcase_grid_component.rb', line 14 def initialize(section_title:, showcases:, section_icon: nil, description: nil, view_more_title: nil, view_more_href: nil, col_size: 'col-12 col-sm-4 col-lg-3 mb-4', border: nil) super() @section_title = section_title @section_icon = section_icon || DEFAULT_ICON @showcases = showcases @description = description @view_more_title = view_more_title @view_more_href = view_more_href @col_size = col_size @border = border end |