Module: Irelia::Options::Flex::Direction
- Included in:
- Flex::Component
- Defined in:
- lib/irelia/options/flex/direction.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/irelia/options/flex/direction.rb', line 5 def self.included(base) base.class_eval do option :direction, default: -> { :row }, in: [ :row, :column ] after_initialize do add_css_classes( class_names( "irelia-flex--row": direction == :row, "irelia-flex--column": direction == :column, ) ) end end end |