Class: Shadcn::InputOtpComponent::GroupComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::InputOtpComponent::GroupComponent
- Defined in:
- app/components/shadcn/input_otp_component.rb
Overview
Group subcomponent
Constant Summary collapse
- BASE_CLASSES =
"flex items-center"
Instance Attribute Summary collapse
-
#slots ⇒ Object
readonly
Returns the value of attribute slots.
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(slots: 3, **options) ⇒ GroupComponent
constructor
A new instance of GroupComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(slots: 3, **options) ⇒ GroupComponent
Returns a new instance of GroupComponent.
158 159 160 161 |
# File 'app/components/shadcn/input_otp_component.rb', line 158 def initialize(slots: 3, **) super(**) @slots = slots end |
Instance Attribute Details
#slots ⇒ Object (readonly)
Returns the value of attribute slots.
163 164 165 |
# File 'app/components/shadcn/input_otp_component.rb', line 163 def slots @slots end |
Instance Method Details
#call ⇒ Object
165 166 167 168 169 |
# File 'app/components/shadcn/input_otp_component.rb', line 165 def call tag.div(class: merge_classes(BASE_CLASSES), **.merge(build_data)) do content end end |