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-14.11.1.pre.alpha.PLAY17445539 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 lib/playbook/overflow.rb
playbook_ui-14.12.0.pre.rc.11 lib/playbook/overflow.rb
playbook_ui-14.12.0.pre.rc.10 lib/playbook/overflow.rb
playbook_ui-14.12.0.pre.rc.9 lib/playbook/overflow.rb
playbook_ui-14.12.0.pre.rc.8 lib/playbook/overflow.rb
playbook_ui-14.12.0.pre.rc.7 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5437 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.PBNTR719listdraggablesimple5432 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.PBNTR768stickyrightcolumn5431 lib/playbook/overflow.rb
playbook_ui-14.12.0.pre.rc.6 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5415 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5413 lib/playbook/overflow.rb
playbook_ui-14.12.0.pre.rc.5 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5409 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5400 lib/playbook/overflow.rb
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5392 lib/playbook/overflow.rb