Sha256: 6022eb0fa1f9908abd83ed6acce12b66c5593dd3157b9dc432cdcf56ad1d38b0

Contents?: true

Size: 471 Bytes

Versions: 4

Compression:

Stored size: 471 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbPill
    class Pill
      include Playbook::Props

      partial "pb_pill/pill"

      prop :text
      prop :variant, type: Playbook::Props::Enum,
                     values: %w[success warning error info neutral],
                     default: "neutral"

      def classname
        generate_classname("pb_pill_kit", variant)
      end

      def display_text
        text.downcase
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
playbook_ui-2.9.7 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-2.9.6 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-2.9.5 app/pb_kits/playbook/pb_pill/pill.rb
playbook_ui-2.9.4 app/pb_kits/playbook/pb_pill/pill.rb