@props([ // name of the input field for use in forms 'name' => 'pin-code-'.uniqid(), // total number of boxes to display 'total_digits' => config('bladewind.code.total_digits', 4), 'totalDigits' => config('bladewind.code.total_digits', 4), /* what function should be called when the user is done entering the verification code. this should just be the function name without parenthesis and parameters. example: verifyPin ... when the user is done entering the code Bladewind will call verifyPin(code) note that the code is passed to your function as the only parameter so you need to expect a parameter when defining your function... using the above example: verifyPin = (pin_code) => {} */ 'on_verify' => null, 'onVerify' => null, // error message to display when pin is wrong 'error_message' => 'You entered a wrong code', 'errorMessage' => 'You entered a wrong code', // should input text be masked to hide code 'mask' => config('bladewind.code.mask', false), // after how many seconds should the link to resend a code be displayed 'timer' => null, // boxes can either be big or regular 'size' => config('bladewind.code.size', 'regular'), ]) @php // reset variables for Laravel 8 support $total_digits = $totalDigits; $error_message = $errorMessage; //-------------------------------------------------------------------- $name = preg_replace('/[\s-]/', '_', $name); $mask = parseBladewindVariable($mask); $input_css = ($size !== 'big') ? " w-14 text-xl" : "w-[75px] text-5xl"; $cloak_size = ($size == 'big') ? " h-24" : "h-16"; @endphp