Class: Shadcn::ItemGroupComponent

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

Overview

Item Group component - container for grouping related items

Constant Summary collapse

BASE_CLASSES =
"flex flex-col"

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



18
19
20
21
22
# File 'app/components/shadcn/item_group_component.rb', line 18

def call
  (:div, class: merge_classes(BASE_CLASSES), **html_options.merge(build_data)) do
    safe_join([items, separators, content].flatten.compact)
  end
end