Sha256: a04fcef80e02903368f75d88ca79c7a820ae97905a0be101ef0cbc0753248e00

Contents?: true

Size: 613 Bytes

Versions: 16

Compression:

Stored size: 613 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module ZIndex
    def self.included(base)
      base.prop :z_index
    end

    def z_index_values
      %w[1 2 3 4 5 6 7 8 9 10]
    end

    def z_index_options
      {
        z_index: "z-index",
      }
    end

  private

    def z_index_props
      selected_index_props = z_index_options.keys.select { |sk| try(sk) }
      return nil unless selected_index_props.present?

      selected_index_props.map do |k|
        index_value = send(k)
        "z_index_#{index_value}" if z_index_values.include? index_value
      end.compact.join(" ")
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
playbook_ui-12.19.0.pre.alpha.movemarkdown639 lib/playbook/z_index.rb
playbook_ui-12.19.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown638 lib/playbook/z_index.rb
playbook_ui-12.19.0.pre.alpha.movemarkdown637 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts632 lib/playbook/z_index.rb
playbook_ui-12.19.0 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown629 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown628 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.play786multilevelselectimprovements627 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown626 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown617 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY735mobileheadersfix616 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.play786multilevelselectimprovements613 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY747carddarktokens610 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts608 lib/playbook/z_index.rb
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts607 lib/playbook/z_index.rb
playbook_ui-12.18.0 lib/playbook/z_index.rb