Class: UI::InputOtpSeparator
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::InputOtpSeparator
- Includes:
- InputOtpSeparatorBehavior
- Defined in:
- app/components/ui/input_otp_separator.rb
Overview
Separator - Phlex implementation
Visual divider between OTP input groups.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ InputOtpSeparator
constructor
A new instance of InputOtpSeparator.
- #view_template ⇒ Object
Methods included from InputOtpSeparatorBehavior
#input_otp_separator_classes, #input_otp_separator_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ InputOtpSeparator
Returns a new instance of InputOtpSeparator.
14 15 16 17 |
# File 'app/components/ui/input_otp_separator.rb', line 14 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/components/ui/input_otp_separator.rb', line 19 def view_template div(**input_otp_separator_html_attributes.merge(@attributes)) do # Render dot or dash separator svg( xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", class: "size-4 opacity-50" ) do |s| s.rect(x: "4", y: "7", width: "7", height: "1", fill: "currentColor", rx: "0.5") end end end |