app/helpers/components/badge_helper.rb in shadcn-ui-0.0.12 vs app/helpers/components/badge_helper.rb in shadcn-ui-0.0.13

- old
+ new

@@ -1,9 +1,9 @@ module Components::BadgeHelper def render_badge(label = "", data: "", text: "", variant: :default, **options) badge_classes = " inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 " - varianet_classes = case variant.to_sym + variant_classes = case variant.to_sym when :default ComponentsHelper::PRIMARY_CLASSES when :secondary ComponentsHelper::SECONDARY_CLASSES when :error, :danger, :alert, :destructive @@ -11,10 +11,10 @@ when :outline ComponentsHelper::OUTLINE_CLASSES when :ghost ComponentsHelper::GHOST_CLASSES end - badge_classes << " #{varianet_classes}" + badge_classes << " #{variant_classes}" text = label if label.present? content_tag :div, class: badge_classes do text end