mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
Sorted all imports in all packages, `cms`, `design-system` and `ui-library` apps by running `pnpm format` on them. All changes in this PR are done by the script.
27 lines
777 B
TypeScript
27 lines
777 B
TypeScript
'use client'
|
|
|
|
import * as React from 'react'
|
|
import { InputOTP, InputOTPGroup, InputOTPSlot } from 'ui'
|
|
|
|
export default function InputOTPControlled() {
|
|
const [value, setValue] = React.useState('')
|
|
|
|
return (
|
|
<div className="space-y-2">
|
|
<InputOTP maxLength={6} value={value} onChange={(value) => setValue(value)}>
|
|
<InputOTPGroup>
|
|
<InputOTPSlot index={0} />
|
|
<InputOTPSlot index={1} />
|
|
<InputOTPSlot index={2} />
|
|
<InputOTPSlot index={3} />
|
|
<InputOTPSlot index={4} />
|
|
<InputOTPSlot index={5} />
|
|
</InputOTPGroup>
|
|
</InputOTP>
|
|
<div className="text-center text-sm">
|
|
{value === '' ? <>Enter your one-time password.</> : <>You entered: {value}</>}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|