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.0.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.0.0.pre.alpha.2 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-11.0.0.pre.alpha.1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.26.1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.27.0.pre.lazysizes1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.27.0.pre.datepicker1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.26.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.26.0.pre.alpha5 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.26.0.pre.rc1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.26.0.pre.alpha.sticky1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.26.0.pre.alpha.display1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.26.0.pre.alpha3 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.25.1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.26.0.pre.alpha1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.25.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.25.0.pre.alpha3 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.25.0.pre.treeshaking1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.24.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.24.0.pre.alpha1 app/pb_kits/playbook/pb_form_pill/form_pill.rb
playbook_ui-10.23.0 app/pb_kits/playbook/pb_form_pill/form_pill.rb