Sha256: c59d4456714f6e1d077ff0ae737a86939097e54004e15f31cb3a87513a1ce4d7

Contents?: true

Size: 1.08 KB

Versions: 378

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

module Playbook
  module PbCollapsible
    class CollapsibleMain < Playbook::KitBase
      prop :color, type: Playbook::Props::Enum,
                   values: %w[default light lighter link success error],
                   default: "default"
      prop :icon
      prop :size, type: Playbook::Props::Enum,
                  values: ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x", nil],
                  default: nil
      def data
        Hash(prop(:data)).merge(collapsible_main: true)
      end

      def classname
        generate_classname("pb_collapsible_main_kit", padding, separator: " ")
      end

      def show_icon(icon)
        case icon
        when "none"
          []
        when ::String
          [icon, icon]
        when ::Array
          icon
        end
      end

      def icon_color
        return "" if color.nil?

        color_object = { light: "#687887", lighter: "#C1CDD6", link: "#0056CF", success: "#00CA74", error: "#FF2229", default: "#242B42" }
        color_object[color.to_sym]
      end
    end
  end
end

Version data entries

378 entries across 378 versions & 1 rubygems

Version Path
playbook_ui-14.4.0.pre.alpha.stephenagreerpatch13910 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.15 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.4.0.pre.alpha.stephenagreerpatch13909 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.4.0.pre.alpha.stephenagreerpatch13908 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.14 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.13 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.12 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.4.0.pre.alpha.PBNTR534filtermaxwidth3903 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.4.0.pre.alpha.PLAY1529removefaeasy3900 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.4.0.pre.alpha.PLAY1529removefaeasy3898 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.4.0.pre.alpha.PBNTR550typeaheadformpilltruncate3895 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.4.0.pre.alpha.PLAY1547reactzoompanpinchlightbox3613893 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.4.0.pre.alpha.PLAY1529removefaeasy3876 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.11 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.10 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.9 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.8 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.7 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.6 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
playbook_ui-14.5.0.pre.rc.5 app/pb_kits/playbook/pb_collapsible/collapsible_main.rb