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.1.pre.alpha.PLAY17445539 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 lib/playbook/border_radius.rb
playbook_ui-14.12.0.pre.rc.11 lib/playbook/border_radius.rb
playbook_ui-14.12.0.pre.rc.10 lib/playbook/border_radius.rb
playbook_ui-14.12.0.pre.rc.9 lib/playbook/border_radius.rb
playbook_ui-14.12.0.pre.rc.8 lib/playbook/border_radius.rb
playbook_ui-14.12.0.pre.rc.7 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5437 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.PBNTR719listdraggablesimple5432 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.PBNTR768stickyrightcolumn5431 lib/playbook/border_radius.rb
playbook_ui-14.12.0.pre.rc.6 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5415 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5413 lib/playbook/border_radius.rb
playbook_ui-14.12.0.pre.rc.5 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5409 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5400 lib/playbook/border_radius.rb
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5392 lib/playbook/border_radius.rb