Sha256: a2842c407f143b52ec7941d85bcdfefac0c4a29b45e083852cac6bf2498def2a
Contents?: true
Size: 822 Bytes
Versions: 10
Compression:
Stored size: 822 Bytes
Contents
module ExpressAdmin class ErrorMessage < ExpressTemplates::Components::Configurable has_option :display, 'Display the error message, by default it is hidden', type: :boolean, default: false has_option :title, 'Title of the error message component', type: :string has_option :messages, 'List of error messages', type: :array has_option :status, type: :string contains -> { if config[:display] div(class: "card #{config[:status]}") { div(class: 'card-divider') { strong { text_node config[:title] } } div(class: 'card-section') { ul { config[:messages].each do |message| li { text_node message } end } } } end } end end
Version data entries
10 entries across 10 versions & 1 rubygems