Sha256: 214f8f5129110053920950d2d461c8a69c7ccf1e56695c0b4befc1b81c7c15c4

Contents?: true

Size: 698 Bytes

Versions: 17

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module FlexDirection
    def self.included(base)
      base.prop :flex_direction
    end

    def flex_direction_props
      selected_props = flex_direction_options.keys.select { |sk| try(sk) }
      return nil unless selected_props.present?

      selected_props.map do |k|
        flex_direction_value = send(k)
        "flex_direction_#{flex_direction_value}" if flex_direction_values.include? flex_direction_value
      end.compact.join(" ")
    end

    def flex_direction_options
      {
        flex_direction: "flex_direction",
      }
    end

    def flex_direction_values
      %w[row column row_reverse column_reverse]
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
playbook_ui-10.26.0.pre.rc1 lib/playbook/flex_direction.rb
playbook_ui-10.26.0.pre.alpha.sticky1 lib/playbook/flex_direction.rb
playbook_ui-10.26.0.pre.alpha.display1 lib/playbook/flex_direction.rb
playbook_ui-10.26.0.pre.alpha3 lib/playbook/flex_direction.rb
playbook_ui-10.25.1 lib/playbook/flex_direction.rb
playbook_ui-10.25.0 lib/playbook/flex_direction.rb
playbook_ui-10.25.0.pre.alpha3 lib/playbook/flex_direction.rb
playbook_ui-10.25.0.pre.treeshaking1 lib/playbook/flex_direction.rb
playbook_ui-10.24.0 lib/playbook/flex_direction.rb
playbook_ui-10.24.0.pre.alpha1 lib/playbook/flex_direction.rb
playbook_ui-10.23.0 lib/playbook/flex_direction.rb
playbook_ui-10.23.0.pre.alpha2 lib/playbook/flex_direction.rb
playbook_ui-10.23.0.pre.alpha1 lib/playbook/flex_direction.rb
playbook_ui-10.22.1 lib/playbook/flex_direction.rb
playbook_ui-10.22.0 lib/playbook/flex_direction.rb
playbook_ui-10.21.1.pre.alpha1 lib/playbook/flex_direction.rb
playbook_ui-10.21.0.pre.alpha.rg1 lib/playbook/flex_direction.rb