Class: Phlexi::Menu::Badge
- Inherits:
-
COMPONENT_BASE
- Object
- Phlexi::Menu::Badge
- Defined in:
- lib/phlexi/menu/badge.rb
Overview
A component for rendering badge elements in menus
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(content, **options) ⇒ Badge
constructor
Initialize a new badge component.
- #view_template ⇒ Object
Constructor Details
#initialize(content, **options) ⇒ Badge
Initialize a new badge component
21 22 23 24 25 |
# File 'lib/phlexi/menu/badge.rb', line 21 def initialize(content, **) @content = content = super() end |
Instance Method Details
#view_template ⇒ Object
27 28 29 |
# File 'lib/phlexi/menu/badge.rb', line 27 def view_template span(class: [:class]) { @content } end |