Class: Shadcn::InputOtpComponent::OtpSeparatorComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::InputOtpComponent::OtpSeparatorComponent
- Defined in:
- app/components/shadcn/input_otp_component.rb
Overview
Separator subcomponent (named OtpSeparatorComponent to avoid conflict with standalone SeparatorComponent)
Constant Summary collapse
- BASE_CLASSES =
"flex items-center justify-center px-2"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
This class inherits a constructor from Shadcn::BaseComponent
Instance Method Details
#call ⇒ Object
176 177 178 179 180 |
# File 'app/components/shadcn/input_otp_component.rb', line 176 def call tag.div(class: merge_classes(BASE_CLASSES), role: "separator", **.merge(build_data)) do content.presence || tag.span(class: "text-muted-foreground") { "-" } end end |