mirror of
https://github.com/lux-tel/websites.git
synced 2026-10-30 20:31:36 +00:00
21 lines
621 B
TypeScript
21 lines
621 B
TypeScript
'use client';
|
|
|
|
import { Input, InputProps } from '@session/ui/ui/input';
|
|
import { useWalletButton } from '@session/wallet/providers/wallet-button-provider';
|
|
import { forwardRef } from 'react';
|
|
|
|
export const SessionTokenInput = forwardRef<HTMLInputElement, InputProps>(({ ...props }, ref) => {
|
|
const { setIsBalanceVisible } = useWalletButton();
|
|
|
|
const handleFocus = () => {
|
|
setIsBalanceVisible(true);
|
|
};
|
|
|
|
const handleBlur = () => {
|
|
setIsBalanceVisible(false);
|
|
};
|
|
|
|
return <Input ref={ref} {...props} onFocus={handleFocus} onBlur={handleBlur} />;
|
|
});
|
|
SessionTokenInput.displayName = 'SessionTokenInput';
|