Class: PhlexKit::InputOtpSeparator

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/input_otp/input_otp_separator.rb

Overview

Divider between OTP groups. See input_otp.rb. Purely decorative — the dash is aria-hidden (no separator role) so AT doesn't announce a stray "-" between the digit fields.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ InputOtpSeparator

Returns a new instance of InputOtpSeparator.



6
# File 'app/components/phlex_kit/input_otp/input_otp_separator.rb', line 6

def initialize(**attrs) = (@attrs = attrs)

Instance Method Details

#view_templateObject



7
# File 'app/components/phlex_kit/input_otp/input_otp_separator.rb', line 7

def view_template = div(**mix({ class: "pk-input-otp-separator", aria_hidden: "true" }, @attrs)) { "-" }