Class: Shadcn::AccordionItemComponent

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

Overview

Accordion Item component

Constant Summary collapse

BASE_CLASSES =
"border-b"

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

#initialize(value:, **options) ⇒ AccordionItemComponent

Returns a new instance of AccordionItemComponent.

Parameters:

  • value (String)

    Unique value identifying this item



16
17
18
19
# File 'app/components/shadcn/accordion_item_component.rb', line 16

def initialize(value:, **options)
  super(**options)
  @value = value
end

Instance Method Details

#callObject



21
22
23
# File 'app/components/shadcn/accordion_item_component.rb', line 21

def call
  (:div, item_content, item_attributes)
end