Class: UI::CollapsibleContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::CollapsibleContent
- Includes:
- CollapsibleContentBehavior
- Defined in:
- app/components/ui/collapsible_content.rb
Instance Method Summary collapse
-
#initialize(force_mount: false, classes: "", **attributes) ⇒ CollapsibleContent
constructor
A new instance of CollapsibleContent.
- #view_template(&block) ⇒ Object
Methods included from CollapsibleContentBehavior
#collapsible_content_classes, #collapsible_content_data_attributes, #collapsible_content_html_attributes
Constructor Details
#initialize(force_mount: false, classes: "", **attributes) ⇒ CollapsibleContent
Returns a new instance of CollapsibleContent.
6 7 8 9 10 |
# File 'app/components/ui/collapsible_content.rb', line 6 def initialize(force_mount: false, classes: "", **attributes) @force_mount = force_mount @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
12 13 14 |
# File 'app/components/ui/collapsible_content.rb', line 12 def view_template(&block) div(**collapsible_content_html_attributes.deep_merge(@attributes), &block) end |