Class: Shadcn::AccordionTriggerComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/accordion_trigger_component.rb

Overview

Accordion Trigger component

Constant Summary collapse

HEADER_CLASSES =
"flex"
TRIGGER_CLASSES =
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180"

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content, #initialize

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

This class inherits a constructor from Shadcn::BaseComponent

Instance Method Details

#callObject



9
10
11
# File 'app/components/shadcn/accordion_trigger_component.rb', line 9

def call
  (:h3, trigger_button, class: HEADER_CLASSES, "data-orientation": "vertical")
end