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.12.0.pre.alpha.PLAY1081exporttypes1609 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1608 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play10281596 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1581 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1580 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1579 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY1093typeaheadkitdocbug1577 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1574 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1567 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1558 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1556 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.PLAY1051removinghighchartsdependency1551 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1550 lib/playbook/overflow.rb
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1543 lib/playbook/overflow.rb
playbook_ui-13.11.1.pre.alpha.play900startratingasinput1530 lib/playbook/overflow.rb
playbook_ui-13.12.0 lib/playbook/overflow.rb
playbook_ui-13.11.1 lib/playbook/overflow.rb
playbook_ui-13.11.0 lib/playbook/overflow.rb
playbook_ui-13.10.0.pre.alpha.PLAY1051removinghighchartsdependency1465 lib/playbook/overflow.rb
playbook_ui-13.10.0.pre.alpha.webpackerregistercomponents1463 lib/playbook/overflow.rb