Sha256: 3b79dd7d2545f5350a7443bda543b5340bc9f9180448a1f1cde9afeb8b353c97

Contents?: true

Size: 438 Bytes

Versions: 119

Compression:

Stored size: 438 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbPill
    class Pill < Playbook::KitBase
      prop :text
      prop :variant, type: Playbook::Props::Enum,
                     values: %w[success warning error info neutral primary],
                     default: "neutral"

      def classname
        generate_classname("pb_pill_kit", variant)
      end

      def display_text
        text.downcase
      end
    end
  end
end

Version data entries

119 entries across 119 versions & 1 rubygems

Version Path
playbook_ui-9.16.0 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.15.0 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.14.1 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.13.0 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.12.0 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.11.0 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.10.0 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.9.0.alpha.inline1 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.9.0 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.8.0 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.7.0.pre.alphawidth1 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.7.0.pre.alpha.a11y.btn app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-9.7.0 app/pb_kits/playbook/pb_pill/pill.rb