Class: Irelia::Stack::Component

Inherits:
Component
  • Object
show all
Includes:
Options::Flex::Items, Options::Flex::Justify
Defined in:
app/components/irelia/stack/component.rb

Instance Method Summary collapse

Methods included from Options::Flex::Justify

included

Methods included from Options::Flex::Items

included

Methods inherited from 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

#variantsObject



10
11
12
13
14
15
16
17
18
19
20
# File 'app/components/irelia/stack/component.rb', line 10

def variants
  class_names(
    "irelia-stack",
    "irelia-stack--default": variant == :default,
    "irelia-stack--horizontal": direction == :horizontal,
    "irelia-stack--horizontal-reverse": direction == :horizontal_reverse,
    "irelia-stack--vertical": direction == :vertical,
    "irelia-stack--vertical-reverse": direction == :vertical_reverse,
    "irelia-stack--grow": grow
  )
end