Class: CubitComponents::PageContainerComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/cubit_components/page_container_component.rb

Instance Method Summary collapse

Instance Method Details

#callObject

Two-element wrapper: an outer gutter element wraps an inner Container. Caller tokens (notably max-w-*) route to the inner Container per FR-17; the outer element carries only the fixed responsive gutters.



14
15
16
17
18
19
20
21
# File 'lib/cubit_components/page_container_component.rb', line 14

def call
  inner = (
    "div",
    content,
    class: ContainerComponent.new(tokens: @tokens).html_classes.map(&:to_s).join(" ")
  )
  (tag_name, inner, class: gutter_classes)
end