Sha256: 05e7913aa33b11a278e5b3b5830cc47fd1c35ec041fc1aa4b351d386f40afd0b

Contents?: true

Size: 550 Bytes

Versions: 294

Compression:

Stored size: 550 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbBadge
    class Badge < Playbook::KitBase
      prop :rounded, type: Playbook::Props::Boolean, default: false
      prop :text
      prop :variant, type: Playbook::Props::Enum,
                     values: %w[success warning error info neutral primary],
                     default: "neutral"

      def classname
        generate_classname("pb_badge_kit", variant, rounded_class)
      end

    private

      def rounded_class
        rounded ? "rounded" : nil
      end
    end
  end
end

Version data entries

294 entries across 294 versions & 1 rubygems

Version Path
playbook_ui-12.15.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.14.0.pre.alpha.lightboxcurrentphotoprop460 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.14.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown457 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.14.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown456 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.14.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.13.0.pre.alpha.PLAY693tooltipwrongbg440 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.13.0.pre.alpha.addingProductTokens439 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.13.0.pre.alpha.PLAY705phonenumberkit438 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.13.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.12.0.pre.alpha.PLAY697sandpacklayoutstyles413 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.12.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.11.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.10.0.pre.alpha.PLAY705phonenumberreturn372 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.10.0.pre.alpha.PLAY677richtexteditorts370 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.10.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.9.1.pre.alpha.play664tiptapinvestigation353 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.9.1.pre.alpha.PLAY689bugtxtinputlabel346 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.9.1.pre.alpha.menucleanup345 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.9.1.pre.alpha.menucleanup342 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.9.1 app/pb_kits/playbook/pb_badge/badge.rb