Class: PhlexUI::Accordion::Trigger
- Inherits:
-
Base
- Object
- Phlex::HTML
- Base
- PhlexUI::Accordion::Trigger
show all
- Defined in:
- lib/phlex_ui/accordion/trigger.rb
Instance Attribute Summary
Attributes inherited from Base
#attrs
Instance Method Summary
collapse
Methods inherited from Base
#before_template, #initialize
Constructor Details
This class inherits a constructor from PhlexUI::Base
Instance Method Details
#default_attrs ⇒ Object
9
10
11
12
13
14
|
# File 'lib/phlex_ui/accordion/trigger.rb', line 9
def default_attrs
{
data: {action: "click->accordion#toggle"},
class: "w-full flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline"
}
end
|
#view_template ⇒ Object
5
6
7
|
# File 'lib/phlex_ui/accordion/trigger.rb', line 5
def view_template(&)
button(**attrs, &)
end
|