Sha256: ae889ba3f2a5d2ca5e5db74b4c369fbe50bf600b8a2f94cf1ec82a0c4d04cb6c

Contents?: true

Size: 748 Bytes

Versions: 727

Compression:

Stored size: 748 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module Overflow
    def self.included(base)
      base.prop :overflow
      base.prop :overflow_x
      base.prop :overflow_y
    end

    def overflow_values
      %w[visible hidden scroll auto]
    end

    def overflow_options
      {
        overflow: "overflow",
        overflow_x: "overflow_x",
        overflow_y: "overflow_y",
      }
    end

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

      selected_props.map do |k|
        overflow_value = send(k)
        "#{overflow_options[k]}_#{overflow_value}" if overflow_values.include? overflow_value
      end.compact.join(" ")
    end
  end
end

Version data entries

727 entries across 727 versions & 1 rubygems

Version Path
playbook_ui-13.14.0.pre.alpha.play1120lintdatepicker1797 lib/playbook/overflow.rb
playbook_ui-13.15.0 lib/playbook/overflow.rb
playbook_ui-13.14.0.pre.alpha.PLAY1109bugdisplaypropblocksfontcolor1784 lib/playbook/overflow.rb
playbook_ui-13.14.0.pre.alpha.play1106filter1751 lib/playbook/overflow.rb
playbook_ui-13.14.0.pre.alpha.play1106filter1748 lib/playbook/overflow.rb
playbook_ui-13.14.0 lib/playbook/overflow.rb
playbook_ui-13.13.0.pre.alpha.PLAY1097linterenhancedelement1728 lib/playbook/overflow.rb
playbook_ui-13.13.0.pre.alpha.play10821727 lib/playbook/overflow.rb
playbook_ui-13.13.0.pre.alpha.play10821726 lib/playbook/overflow.rb
playbook_ui-13.13.0.pre.alpha.play10221678 lib/playbook/overflow.rb
playbook_ui-13.13.0.pre.alpha.PLAY1090csstokens1675 lib/playbook/overflow.rb
playbook_ui-13.13.0.pre.alpha.play900startratingasinput1657 lib/playbook/overflow.rb
playbook_ui-13.13.0 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY880cardkithighlightzindex1655 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1627 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1626 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1624 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1623 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1612 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1611 lib/playbook/overflow.rb