Sha256: a0358e6e5417df14ea0516abfea1e2df34c49ba5d2b45e4152ae57f536376fd9

Contents?: true

Size: 678 Bytes

Versions: 551

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

require "playbook/position_props_css"

module Playbook
  module Right
    include Playbook::PositionPropsCss

    def self.included(base)
      base.prop :right
    end

    def right_values
      %w[0 xxs xs sm md lg xl auto initial inherit]
    end

    def right_options
      {
        right: "right",
      }
    end

  private

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

      selected_props.map do |k|
        value = send(k)
        css = positioning_css("right", value) if right.present?
        css
      end.compact.join(" ")
    end
  end
end

Version data entries

551 entries across 551 versions & 1 rubygems

Version Path
playbook_ui-13.25.0 lib/playbook/right.rb
playbook_ui-13.24.0.pre.alpha.play1305drycontenttag2689 lib/playbook/right.rb
playbook_ui-13.24.0.pre.alpha.PBNTR261NewKitDropdown2681 lib/playbook/right.rb
playbook_ui-13.24.0.pre.alpha.PLAY1181circleiconkitfixsizingerrorglobalspacingprops2675 lib/playbook/right.rb
playbook_ui-13.24.0.pre.alpha.PLAY998backgroundkitremoveemptyinlinline2666 lib/playbook/right.rb
playbook_ui-13.23.0.pre.alpha.PLAY1284investigation2657 lib/playbook/right.rb
playbook_ui-13.24.0 lib/playbook/right.rb
playbook_ui-13.22.0.pre.alpha.pbntr254barchartnegativenumber2640 lib/playbook/right.rb
playbook_ui-13.22.0.pre.alpha.PLAY1297updatetextstyles2636 lib/playbook/right.rb
playbook_ui-13.22.0.pre.alpha.playbookgemspecrailsversion2608 lib/playbook/right.rb
playbook_ui-13.23.0 lib/playbook/right.rb