Sha256: 0cbcdb4af342ecd4898da24bef8dabaa87b3a09833e065812bbd6df42d19807e
Contents?: true
Size: 724 Bytes
Versions: 14
Compression:
Stored size: 724 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
14 entries across 14 versions & 1 rubygems