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-11.16.0.pre.alpha.paginationrails1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.16.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.16.0.pre.alpha.reactupgrade1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.15.0.pre.alpha.table1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.16.0.pre.alpha.pagination.rails1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.15.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.14.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.13.0.pre.alpha.fontawesome1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.13.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.12.1.pre.alpha.charts1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.12.1.pre.alpha.passphrase1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.12.1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.13.0.pre.alpha.fileupload1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.12.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.11.0.pre.alpha.paginate2 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.11.0.pre.alpha.dialog2 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.11.0.pre.alpha.paginate1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.11.0.pre.alpha.renderer1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.11.0.pre.alpha.dialog1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.11.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb