Sha256: 189f5655ce0cad8a999f749a6f332f47b53ef07c33b7d9ea3c59da92d6f20491

Contents?: true

Size: 535 Bytes

Versions: 11

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

module MrCommon
  module BadgeHelper
    def success_badge(text, value: false, default_class: "badge")
      content_tag(:span, text, class: value ? "badge-success" : default_class)
    end

    def primary_badge(text, value: false, default_class: "badge")
      content_tag(:span, text, class: value ? "badge-primary" : default_class)
    end

    def alert_badge(text, value: false, default_class: "badge")
      content_tag(:span, text, class: value ? "badge-alert" : default_class)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mr_common-2.1.0 app/helpers/mr_common/badge_helper.rb
mr_common-2.0.0 app/helpers/mr_common/badge_helper.rb
mr_common-1.3.0 app/helpers/mr_common/badge_helper.rb
mr_common-1.2.0 app/helpers/mr_common/badge_helper.rb
mr_common-1.1.0 app/helpers/mr_common/badge_helper.rb
mr_common-1.0.5 app/helpers/mr_common/badge_helper.rb
mr_common-1.0.4 app/helpers/mr_common/badge_helper.rb
mr_common-1.0.3 app/helpers/mr_common/badge_helper.rb
mr_common-1.0.2 app/helpers/mr_common/badge_helper.rb
mr_common-1.0.1 app/helpers/mr_common/badge_helper.rb
mr_common-1.0.0 app/helpers/mr_common/badge_helper.rb