Sha256: ae889ba3f2a5d2ca5e5db74b4c369fbe50bf600b8a2f94cf1ec82a0c4d04cb6c

Contents?: true

Size: 748 Bytes

Versions: 590

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

590 entries across 590 versions & 1 rubygems

Version Path
playbook_ui-14.9.0.pre.rc.9 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.PLAY1680newwidthprop4661 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.PLAY1658tanstackbump4657 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 lib/playbook/overflow.rb
playbook_ui-14.9.0.pre.rc.8 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 lib/playbook/overflow.rb
playbook_ui-14.9.0.pre.rc.7 lib/playbook/overflow.rb
playbook_ui-14.9.0.pre.rc.6 lib/playbook/overflow.rb
playbook_ui-14.9.0.pre.rc.5 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 lib/playbook/overflow.rb
playbook_ui-14.9.0.pre.rc.4 lib/playbook/overflow.rb
playbook_ui-14.9.0.pre.rc.3 lib/playbook/overflow.rb
playbook_ui-14.9.0.pre.rc.2 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4567 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4563 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4559 lib/playbook/overflow.rb
playbook_ui-14.9.0.pre.rc.1 lib/playbook/overflow.rb
playbook_ui-14.8.0.pre.alpha.PLAY16254545 lib/playbook/overflow.rb