Sha256: ccac47f1b9652050bb574053bcb9f11a13ec8a637d6c1f633c43031d3b4a06ec
Contents?: true
Size: 664 Bytes
Versions: 19
Compression:
Stored size: 664 Bytes
Contents
module Headmin module NotificationHelper def notification_color(name) color = { notice: { background: "bg-success", text: "text-white" }, error: { text: "text-dark", background: "bg-danger" }, alert: { text: "text-dark", background: "bg-warning" }, timedout: { text: "text-dark", background: "bg-warning" }, fallback: { text: "text-light", background: "bg-info" } } name = name.to_sym color.key?(name) ? color[name] : color[:fallback] end end end
Version data entries
19 entries across 19 versions & 1 rubygems