Class: Shadcn::SelectGroupComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::SelectGroupComponent
- Defined in:
- app/components/shadcn/select_group_component.rb
Overview
Select Group component
Constant Summary collapse
- LABEL_CLASSES =
"px-2 py-1.5 text-sm font-semibold"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(label: nil, **options, &block) ⇒ SelectGroupComponent
constructor
A new instance of SelectGroupComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(label: nil, **options, &block) ⇒ SelectGroupComponent
Returns a new instance of SelectGroupComponent.
13 14 15 16 |
# File 'app/components/shadcn/select_group_component.rb', line 13 def initialize(label: nil, **, &block) super(**, &block) @label = label end |
Instance Method Details
#call ⇒ Object
18 19 20 |
# File 'app/components/shadcn/select_group_component.rb', line 18 def call content_tag(:div, group_content, role: "group") end |