Sha256: 8456497b68ec5d5aad36bc538e4c759d90fd80965d4b72a56c981f32011ad625

Contents?: true

Size: 675 Bytes

Versions: 781

Compression:

Stored size: 675 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module BorderRadius
    def self.included(base)
      base.prop :border_radius
    end

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

      selected_props.map do |k|
        border_radius_value = send(k)
        "border_radius_#{border_radius_value}" if border_radius_values.include? border_radius_value
      end.compact.join(" ")
    end

    def border_radius_options
      {
        border_radius: "border_radius",
      }
    end

    def border_radius_values
      %w[none xs sm md lg xl rounded]
    end
  end
end

Version data entries

781 entries across 781 versions & 1 rubygems

Version Path
playbook_ui-14.11.0.pre.rc.17 lib/playbook/border_radius.rb
playbook_ui-14.11.0 lib/playbook/border_radius.rb
playbook_ui-14.11.0.pre.rc.16 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play16825301 lib/playbook/border_radius.rb
playbook_ui-14.11.0.pre.rc.15 lib/playbook/border_radius.rb
playbook_ui-14.11.0.pre.rc.14 lib/playbook/border_radius.rb
playbook_ui-14.11.0.pre.rc.13 lib/playbook/border_radius.rb
playbook_ui-14.11.0.pre.rc.12 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5274 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play1465attempt25272 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play16825244 lib/playbook/border_radius.rb
playbook_ui-14.11.0.pre.rc.11 lib/playbook/border_radius.rb
playbook_ui-14.11.0.pre.rc.10 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5214 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5213 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5210 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5208 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5207 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play16825206 lib/playbook/border_radius.rb
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5204 lib/playbook/border_radius.rb