Skip to content

Commit

Permalink
tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarkhatov committed Aug 20, 2024
1 parent 526fc24 commit 9a551ac
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions src/app/components/Modals/ConnectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const ConnectModal: React.FC<ConnectModalProps> = ({
}) => {
const [termsAccepted, setTermsAccepted] = useState(false);
const [noInscription, setNoInscription] = useState(false);
const [noHWWallet, setNoHWWallet] = useState(false);
const [selectedWallet, setSelectedWallet] = useState<string>("");
const [mounted, setMounted] = useState(false);

Expand Down Expand Up @@ -142,7 +143,7 @@ export const ConnectModal: React.FC<ConnectModalProps> = ({
<IoMdClose size={24} />
</button>
</div>
<div className="flex flex-col justify-center gap-4">
<div className="flex flex-col justify-center gap-2">
<div className="form-control">
<label className="label cursor-pointer justify-start gap-2 rounded-xl bg-base-100 p-4">
<input
Expand Down Expand Up @@ -177,9 +178,31 @@ export const ConnectModal: React.FC<ConnectModalProps> = ({
</span>
</label>
</div>
<div className="form-control">
<label className="label cursor-pointer justify-start gap-2 rounded-xl bg-base-100 p-4">
<input
type="checkbox"
className="checkbox-primary checkbox"
onChange={(e) => setNoHWWallet(e.target.checked)}
checked={noHWWallet}
/>
<span className="label-text">
I certify that I am not connecting an unsupported hardware wallet.
</span>
<span
className="cursor-pointer text-xs"
data-tooltip-id="hw-wallet"
data-tooltip-content="I acknowledge that Keystone via QR code is the only hardware wallet supporting Bitcoin Staking. Using any other hardware wallets through any means (such as connection to software/extension/mobile wallet) can lead to permanent inability to withdraw the stake."
data-tooltip-place="top"
>
<AiOutlineInfoCircle />
<Tooltip id="hw-wallet" className="tooltip-wrap" />
</span>
</label>
</div>
<div className="my-4 flex flex-col gap-4">
<h3 className="text-center font-semibold">Choose wallet</h3>
<div className="grid max-h-[20rem] grid-cols-1 gap-4 overflow-y-auto">
<div className="grid max-h-[15rem] md:max-h-[20rem] grid-cols-1 gap-4 overflow-y-auto">
{walletList.map(
({
provider,
Expand Down Expand Up @@ -243,7 +266,8 @@ export const ConnectModal: React.FC<ConnectModalProps> = ({
connectDisabled ||
!termsAccepted ||
!selectedWallet ||
!noInscription
!noInscription ||
!noHWWallet
}
>
<PiWalletBold size={20} />
Expand Down

0 comments on commit 9a551ac

Please sign in to comment.