Class: Irelia::Container::Component

Inherits:
Irelia::Component show all
Includes:
Options::Padding
Defined in:
app/components/irelia/container/component.rb

Instance Method Summary collapse

Methods included from Options::Padding

included

Methods inherited from Irelia::Component

#add_css_classes, after_initialize, #html_options, inherited, #initialize, run_after_initialize_hooks

Constructor Details

This class inherits a constructor from Irelia::Component

Instance Method Details

#callObject



25
26
27
28
29
# File 'app/components/irelia/container/component.rb', line 25

def call
   :div, html_options do
    content
  end
end

#variantsObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/components/irelia/container/component.rb', line 9

def variants
  class_names(
    "irelia-container",
    "irelia-container--default": variant == :default,
    "irelia-container--size-full-width": size == :full_width,
    "irelia-container--size-xxl": size == :xxl,
    "irelia-container--size-xl": size == :xl,
    "irelia-container--size-lg": size == :lg,
    "irelia-container--size-md": size == :md,
    "irelia-container--size-sm": size == :sm,
    "irelia-container--size-xs": size == :xs,
    "irelia-container--size-xxs": size == :xxs,
    "irelia-container--center": center == true
  )
end