/ src / components / infoTooltips / AvailableTooltip.tsx
AvailableTooltip.tsx
 1  import { Trans } from '@lingui/macro';
 2  
 3  import { CapType } from '../caps/helper';
 4  import { TextWithTooltip, TextWithTooltipProps } from '../TextWithTooltip';
 5  
 6  interface AvailableTooltipProps extends TextWithTooltipProps {
 7    capType: CapType;
 8  }
 9  
10  export const AvailableTooltip = ({ capType, ...rest }: AvailableTooltipProps) => {
11    const description =
12      capType === CapType.supplyCap ? (
13        <Trans>
14          This is the total amount that you are able to supply to in this reserve. You are able to
15          supply your wallet balance up until the supply cap is reached.
16        </Trans>
17      ) : (
18        <Trans>
19          This is the total amount available for you to borrow. You can borrow based on your
20          collateral and until the borrow cap is reached.
21        </Trans>
22      );
23  
24    return <TextWithTooltip {...rest}>{description}</TextWithTooltip>;
25  };