Sha256: 514368652ce3ea0f6290010d1002f73b38f5c94b2ffac8a37afb4f6c8008076e
Contents?: true
Size: 659 Bytes
Versions: 360
Compression:
Stored size: 659 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 notification primary], default: "neutral" def classname generate_classname("pb_badge_kit", variant_class, rounded_class) end private def variant_class variant === "success" ? "success_sm" : variant end def rounded_class rounded ? "rounded" : nil end end end end
Version data entries
360 entries across 360 versions & 1 rubygems