chore: adjust margin requirement spacing (#1922)

Co-authored-by: Madalina Raicu <madalina@raygroup.uk>
This commit is contained in:
Matthew Russell 2022-11-01 13:45:30 -05:00 committed by GitHub
parent f242cb9772
commit cd5f769c02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import { DepositContainer } from '@vegaprotocol/deposits';
import { normalizeFormatNumber, t } from '@vegaprotocol/react-helpers';
import { Button, Dialog } from '@vegaprotocol/ui-toolkit';
import { ButtonLink, Dialog } from '@vegaprotocol/ui-toolkit';
import React from 'react';
import { useState } from 'react';
@ -26,8 +26,14 @@ export const ValidateMargin = ({
className="flex flex-col center pb-3"
data-testid="deal-ticket-margin-invalidated"
>
<p>
{t("You don't have enough margin available to open this position.")}
<p className="mb-2">
{t("You don't have enough margin available to open this position.")}{' '}
<ButtonLink
data-testid="deal-ticket-deposit-dialog-button"
onClick={() => setDepositDialog(true)}
>
{t(`Deposit ${symbol}`)}
</ButtonLink>
</p>
<p>
{`${normalizeFormatNumber(margin, decimals)} ${symbol} ${t(
@ -36,15 +42,6 @@ export const ValidateMargin = ({
'available'
)}`}
</p>
<Button
className="center mt-2"
variant="default"
size="xs"
data-testid="deal-ticket-deposit-dialog-button"
onClick={() => setDepositDialog(true)}
>
{t('Deposit')} {symbol}
</Button>
</div>
<Dialog open={depositDialog} onChange={setDepositDialog}>
<h1 className="text-2xl mb-4">{t('Deposit')}</h1>