Skip to content

Commit 9a89fae

Browse files
authored
Merge pull request #211 from comit-network/fix-tooltip
Fix tooltip display
2 parents 826cf77 + 9e56363 commit 9a89fae

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

waves/src/Borrow.tsx

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, Center, Tooltip, useToast, VStack } from "@chakra-ui/react";
1+
import { Box, Button, Center, Tooltip, useToast, VStack } from "@chakra-ui/react";
22
import Debug from "debug";
33
import React, { Dispatch } from "react";
44
import { AsyncState, useAsync } from "react-async";
@@ -165,16 +165,23 @@ function Borrow({ dispatch, state, rate, wavesProvider, walletStatusAsyncState }
165165
<Center bg="gray.100" w={400} h={400} borderRadius={"md"}>
166166
<VStack spacing={4}>
167167
<p>Principal:</p>
168-
<Tooltip label={"min = " + minPrincipal + " max = " + maxPrincipal} aria-label="principal" hasArrow>
169-
<NumberInput
170-
currency="$"
171-
value={state.principalAmount}
172-
precision={2}
173-
step={0.01}
174-
onAmountChange={onPrincipalAmountChange}
175-
isDisabled={loanOfferLoading}
176-
dataCy={"data-cy-principal"}
177-
/>
168+
<Tooltip
169+
label={"min = " + minPrincipal + " max = " + maxPrincipal}
170+
aria-label="principal"
171+
hasArrow
172+
placement={"right"}
173+
>
174+
<Box>
175+
<NumberInput
176+
currency="$"
177+
value={state.principalAmount}
178+
precision={2}
179+
step={0.01}
180+
onAmountChange={onPrincipalAmountChange}
181+
isDisabled={loanOfferLoading}
182+
dataCy={"data-cy-principal"}
183+
/>
184+
</Box>
178185
</Tooltip>
179186
<p>Collateral:</p>
180187
<NumberInput

0 commit comments

Comments
 (0)