Class: PandaCms::EditorJs::Blocks::Alert
- Defined in:
- app/lib/panda_cms/editor_js/blocks/alert.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from PandaCms::EditorJs::Blocks::Base
Instance Method Details
#render ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/lib/panda_cms/editor_js/blocks/alert.rb', line 5 def render = sanitize(data["message"]) type = data["type"] || "primary" html_safe( "<div class=\"#{alert_classes(type)} p-4 mb-4 rounded-lg\">" \ "#{}" \ "</div>" ) end |