Sha256: cf73b2d6164e8a2a4914353f1e971f17b2874431cab3f5a7e972ac343af8809e

Contents?: true

Size: 599 Bytes

Versions: 585

Compression:

Stored size: 599 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbFormPill
    class FormPill < Playbook::KitBase
      prop :avatar_url
      prop :name
      prop :text
      prop :size

      prop :text_transform, type: Playbook::Props::Enum,
                            values: %w[none lowercase],
                            default: "none"

      def classname
        generate_classname("pb_form_pill_kit", "primary", name, text, text_transform)
      end

      def display_text
        object.text
      end

      def size_class
        size == "small" ? " small" : ""
      end
    end
  end
end

Version data entries

585 entries across 585 versions & 1 rubygems

Version Path
playbook_ui-12.4.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-12.3.1.pre.alpha.phone1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-12.3.1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-12.3.0.pre.alpha.patchtest1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-12.3.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-12.2.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-12.1.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-12.0.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.20.0.pre.alpha.passthrough1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.20.0.pre.alpha.railsdialog1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.20.0.pre.alpha.focus1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.20.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.19.0.pre.alpha.map1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.19.0.pre.alpha.pagpassthrough1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.19.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.18.0.pre.alpha.pagutility1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.19.0.pre.typeahead1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.18.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.17.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.15.0.pre.alpha.dependencies1 app/pb_kits/playbook/pb_form_pill/form_pill.rb