Class: FoxTail::ListGroup::ItemComponent
- Inherits:
-
ClickableComponent
- Object
- ClickableComponent
- FoxTail::ListGroup::ItemComponent
- Defined in:
- app/components/fox_tail/list_group/item_component.rb
Instance Method Summary collapse
- #before_render ⇒ Object
- #call ⇒ Object
- #hoverable? ⇒ Boolean
- #render? ⇒ Boolean
- #root_tag_name ⇒ Object
Instance Method Details
#before_render ⇒ Object
50 51 52 53 54 55 56 57 |
# File 'app/components/fox_tail/list_group/item_component.rb', line 50 def before_render super if selected? html_attributes[:aria] ||= {} html_attributes[:aria][:current] = true end end |
#call ⇒ Object
59 60 61 62 63 64 65 |
# File 'app/components/fox_tail/list_group/item_component.rb', line 59 def call super do concat visual if visual? concat content concat badge if badge? end end |
#hoverable? ⇒ Boolean
42 43 44 |
# File 'app/components/fox_tail/list_group/item_component.rb', line 42 def hoverable? !static? end |
#render? ⇒ Boolean
46 47 48 |
# File 'app/components/fox_tail/list_group/item_component.rb', line 46 def render? content? end |
#root_tag_name ⇒ Object
38 39 40 |
# File 'app/components/fox_tail/list_group/item_component.rb', line 38 def root_tag_name static? ? :div : super end |