1- import * as React from "react"
2- import { OTPInput , OTPInputContext } from "input-otp"
3- import { MinusIcon } from "lucide-react"
1+ import * as React from "react" ;
2+ import { OTPInput , OTPInputContext } from "input-otp" ;
3+ import { MinusIcon } from "lucide-react" ;
44
5- import { cn } from "~/lib/utils"
5+ import { cn } from "~/lib/utils" ;
66
77function InputOTP ( {
88 className,
99 containerClassName,
1010 ...props
1111} : React . ComponentProps < typeof OTPInput > & {
12- containerClassName ?: string
12+ containerClassName ?: string ;
1313} ) {
1414 return (
1515 < OTPInput
@@ -21,7 +21,7 @@ function InputOTP({
2121 className = { cn ( "disabled:cursor-not-allowed" , className ) }
2222 { ...props }
2323 />
24- )
24+ ) ;
2525}
2626
2727function InputOTPGroup ( { className, ...props } : React . ComponentProps < "div" > ) {
@@ -31,18 +31,18 @@ function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
3131 className = { cn ( "flex items-center" , className ) }
3232 { ...props }
3333 />
34- )
34+ ) ;
3535}
3636
3737function InputOTPSlot ( {
3838 index,
3939 className,
4040 ...props
4141} : React . ComponentProps < "div" > & {
42- index : number
42+ index : number ;
4343} ) {
44- const inputOTPContext = React . useContext ( OTPInputContext )
45- const { char, hasFakeCaret, isActive } = inputOTPContext ? .slots [ index ] ?? { }
44+ const inputOTPContext = React . useContext ( OTPInputContext ) ;
45+ const { char, hasFakeCaret, isActive } = inputOTPContext . slots [ index ] ?? { } ;
4646
4747 return (
4848 < div
@@ -61,15 +61,15 @@ function InputOTPSlot({
6161 </ div >
6262 ) }
6363 </ div >
64- )
64+ ) ;
6565}
6666
6767function InputOTPSeparator ( { ...props } : React . ComponentProps < "div" > ) {
6868 return (
6969 < div data-slot = "input-otp-separator" role = "separator" { ...props } >
7070 < MinusIcon />
7171 </ div >
72- )
72+ ) ;
7373}
7474
75- export { InputOTP , InputOTPGroup , InputOTPSlot , InputOTPSeparator }
75+ export { InputOTP , InputOTPGroup , InputOTPSlot , InputOTPSeparator } ;
0 commit comments