Sha256: 1e5e6c2f3ed05018d8079bf6fde037c0d84cc10491c347df34db51140f70b822

Contents?: true

Size: 672 Bytes

Versions: 1067

Compression:

Stored size: 672 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module LineHeight
    def self.included(base)
      base.prop :line_height
    end

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

      selected_props.map do |k|
        line_height_value = send(k)
        "line_height_#{line_height_value}" if line_height_values.include? line_height_value
      end.compact.join(" ")
    end

    def line_height_options
      {
        line_height: "line_height",
      }
    end

    def line_height_values
      %w[tightest tighter tight normal loose looser loosest]
    end
  end
end

Version data entries

1,067 entries across 1,067 versions & 1 rubygems

Version Path
playbook_ui-11.12.1.pre.alpha.passphrase1 lib/playbook/line_height.rb
playbook_ui-11.12.1 lib/playbook/line_height.rb
playbook_ui-11.13.0.pre.alpha.fileupload1 lib/playbook/line_height.rb
playbook_ui-11.12.0 lib/playbook/line_height.rb
playbook_ui-11.11.0.pre.alpha.paginate2 lib/playbook/line_height.rb
playbook_ui-11.11.0.pre.alpha.dialog2 lib/playbook/line_height.rb
playbook_ui-11.11.0.pre.alpha.paginate1 lib/playbook/line_height.rb
playbook_ui-11.11.0.pre.alpha.renderer1 lib/playbook/line_height.rb
playbook_ui-11.11.0.pre.alpha.dialog1 lib/playbook/line_height.rb
playbook_ui-11.11.0 lib/playbook/line_height.rb
playbook_ui-11.10.0.pre.alpha.pre.bold1 lib/playbook/line_height.rb
playbook_ui-11.10.0.pre.alpha.pagination1 lib/playbook/line_height.rb
playbook_ui-11.10.0 lib/playbook/line_height.rb
playbook_ui-11.9.0 lib/playbook/line_height.rb
playbook_ui-11.9.0.pre.alpha.fileupload1 lib/playbook/line_height.rb
playbook_ui-11.8.1 lib/playbook/line_height.rb
playbook_ui-11.8.0 lib/playbook/line_height.rb
playbook_ui-11.7.0.pre.alpha.table1 lib/playbook/line_height.rb
playbook_ui-11.7.0 lib/playbook/line_height.rb
playbook_ui-11.6.0.pre.alpha.fontawesome lib/playbook/line_height.rb