Class: UI::InputOtpSlot
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::InputOtpSlot
- Includes:
- InputOtpSlotBehavior
- Defined in:
- app/components/ui/input_otp_slot.rb
Overview
Slot - Phlex implementation
Individual OTP input slot for a single character.
Instance Method Summary collapse
-
#initialize(index: 0, value: "", name: nil, id: nil, disabled: false, classes: "", **attributes) ⇒ InputOtpSlot
constructor
A new instance of InputOtpSlot.
- #view_template ⇒ Object
Methods included from InputOtpSlotBehavior
#input_otp_slot_classes, #input_otp_slot_data_attributes, #input_otp_slot_html_attributes
Constructor Details
#initialize(index: 0, value: "", name: nil, id: nil, disabled: false, classes: "", **attributes) ⇒ InputOtpSlot
Returns a new instance of InputOtpSlot.
19 20 21 22 23 24 25 26 27 |
# File 'app/components/ui/input_otp_slot.rb', line 19 def initialize(index: 0, value: "", name: nil, id: nil, disabled: false, classes: "", **attributes) @index = index @value = value @name = name @id = id @disabled = disabled @classes = classes @attributes = attributes end |
Instance Method Details
#view_template ⇒ Object
29 30 31 |
# File 'app/components/ui/input_otp_slot.rb', line 29 def view_template input(**input_otp_slot_html_attributes.merge(@attributes)) end |