-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
7,247 additions
and
10,059 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
packages/kit/src/components/KitProvider/ConnectWalletContent/WaasCodeInputContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { useState } from 'react' | ||
import { | ||
Box, | ||
Button, | ||
Text, | ||
Spinner, | ||
} from '@0xsequence/design-system' | ||
import { PINCodeInput } from './PINCodeInput' | ||
|
||
|
||
export interface WaasCodeInputContentProps { | ||
isLoading: boolean | ||
onVerify: () => {} | ||
} | ||
|
||
export const WaasCodeInputContent = ({ | ||
isLoading, | ||
onVerify | ||
}: WaasCodeInputContentProps) => { | ||
const [waasEmailPinCode, setWaasEmailPinCode] = useState<string[]>([]) | ||
|
||
|
||
return ( | ||
<> | ||
<Box paddingY="6" alignItems="center" justifyContent="center" flexDirection="column"> | ||
<Text marginTop="5" marginBottom="4" variant="normal" color="text80"> | ||
Enter code received in email. | ||
</Text> | ||
<PINCodeInput value={waasEmailPinCode} digits={6} onChange={setWaasEmailPinCode} /> | ||
|
||
<Box gap="2" marginY="4" alignItems="center" justifyContent="center" style={{ height: '44px' }}> | ||
{isLoading ? ( | ||
<Spinner /> | ||
) : ( | ||
<Button | ||
variant="primary" | ||
disabled={waasEmailPinCode.includes('')} | ||
label="Verify" | ||
onClick={() => onVerify()} | ||
data-id="verifyButton" | ||
/> | ||
)} | ||
</Box> | ||
</Box> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.