Module: UI::InputOtpSeparatorBehavior
- Included in:
- InputOtpSeparator, InputOtpSeparatorComponent
- Defined in:
- app/behaviors/ui/input_otp_separator_behavior.rb
Overview
InputOtpSeparatorBehavior
Shared behavior for InputOtpSeparator component across ERB, ViewComponent, and Phlex implementations. This module provides consistent HTML attribute generation for OTP slot separators.
Instance Method Summary collapse
-
#input_otp_separator_classes ⇒ Object
Returns combined CSS classes for the input OTP separator.
-
#input_otp_separator_html_attributes ⇒ Object
Returns HTML attributes for the input OTP separator element.
Instance Method Details
#input_otp_separator_classes ⇒ Object
Returns combined CSS classes for the input OTP separator
19 20 21 22 23 24 25 |
# File 'app/behaviors/ui/input_otp_separator_behavior.rb', line 19 def input_otp_separator_classes classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([ input_otp_separator_base_classes, classes_value ].compact.join(" ")) end |
#input_otp_separator_html_attributes ⇒ Object
Returns HTML attributes for the input OTP separator element
11 12 13 14 15 16 |
# File 'app/behaviors/ui/input_otp_separator_behavior.rb', line 11 def input_otp_separator_html_attributes { class: input_otp_separator_classes, role: "separator" } end |