Class: LeanCms::CardsSectionComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- LeanCms::CardsSectionComponent
- Defined in:
- app/components/lean_cms/cards_section_component.rb
Instance Attribute Summary collapse
-
#card_class ⇒ Object
readonly
Returns the value of attribute card_class.
-
#container_class ⇒ Object
readonly
Returns the value of attribute container_class.
-
#gap ⇒ Object
readonly
Returns the value of attribute gap.
-
#grid_cols ⇒ Object
readonly
Returns the value of attribute grid_cols.
-
#icon_bg_gradient ⇒ Object
readonly
Returns the value of attribute icon_bg_gradient.
-
#icon_shape ⇒ Object
readonly
Returns the value of attribute icon_shape.
-
#icon_size ⇒ Object
readonly
Returns the value of attribute icon_size.
-
#ignore_card_bg ⇒ Object
readonly
Returns the value of attribute ignore_card_bg.
-
#scroll_animate ⇒ Object
readonly
Returns the value of attribute scroll_animate.
-
#section ⇒ Object
readonly
Returns the value of attribute section.
-
#stagger_delay ⇒ Object
readonly
Returns the value of attribute stagger_delay.
-
#text_align ⇒ Object
readonly
Returns the value of attribute text_align.
Attributes inherited from BaseComponent
Instance Method Summary collapse
-
#initialize(section:, page: nil, grid_cols: 3, gap: 8, container_class: '', card_class: 'bg-white rounded-xl p-8 shadow-sm hover:shadow-md transition-shadow', icon_size: 12, icon_shape: 'lg', icon_bg_gradient: false, text_align: nil, ignore_card_bg: false, scroll_animate: false, stagger_delay: 150, **options) ⇒ CardsSectionComponent
constructor
A new instance of CardsSectionComponent.
Constructor Details
#initialize(section:, page: nil, grid_cols: 3, gap: 8, container_class: '', card_class: 'bg-white rounded-xl p-8 shadow-sm hover:shadow-md transition-shadow', icon_size: 12, icon_shape: 'lg', icon_bg_gradient: false, text_align: nil, ignore_card_bg: false, scroll_animate: false, stagger_delay: 150, **options) ⇒ CardsSectionComponent
Returns a new instance of CardsSectionComponent.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/components/lean_cms/cards_section_component.rb', line 7 def initialize(section:, page: nil, grid_cols: 3, gap: 8, container_class: '', card_class: 'bg-white rounded-xl p-8 shadow-sm hover:shadow-md transition-shadow', icon_size: 12, icon_shape: 'lg', icon_bg_gradient: false, text_align: nil, ignore_card_bg: false, scroll_animate: false, stagger_delay: 150, **) super(page: page) @section = section @grid_cols = grid_cols @gap = gap @container_class = container_class @card_class = card_class @icon_size = icon_size @icon_shape = icon_shape @icon_bg_gradient = icon_bg_gradient @text_align = text_align @ignore_card_bg = ignore_card_bg @scroll_animate = scroll_animate @stagger_delay = stagger_delay @options = end |
Instance Attribute Details
#card_class ⇒ Object (readonly)
Returns the value of attribute card_class.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def card_class @card_class end |
#container_class ⇒ Object (readonly)
Returns the value of attribute container_class.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def container_class @container_class end |
#gap ⇒ Object (readonly)
Returns the value of attribute gap.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def gap @gap end |
#grid_cols ⇒ Object (readonly)
Returns the value of attribute grid_cols.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def grid_cols @grid_cols end |
#icon_bg_gradient ⇒ Object (readonly)
Returns the value of attribute icon_bg_gradient.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def icon_bg_gradient @icon_bg_gradient end |
#icon_shape ⇒ Object (readonly)
Returns the value of attribute icon_shape.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def icon_shape @icon_shape end |
#icon_size ⇒ Object (readonly)
Returns the value of attribute icon_size.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def icon_size @icon_size end |
#ignore_card_bg ⇒ Object (readonly)
Returns the value of attribute ignore_card_bg.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def ignore_card_bg @ignore_card_bg end |
#scroll_animate ⇒ Object (readonly)
Returns the value of attribute scroll_animate.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def scroll_animate @scroll_animate end |
#section ⇒ Object (readonly)
Returns the value of attribute section.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def section @section end |
#stagger_delay ⇒ Object (readonly)
Returns the value of attribute stagger_delay.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def stagger_delay @stagger_delay end |
#text_align ⇒ Object (readonly)
Returns the value of attribute text_align.
3 4 5 |
# File 'app/components/lean_cms/cards_section_component.rb', line 3 def text_align @text_align end |