chore: adjust margin requirement spacing (#1922)
Co-authored-by: Madalina Raicu <madalina@raygroup.uk>
This commit is contained in:
parent
f242cb9772
commit
cd5f769c02
@ -1,6 +1,6 @@
|
|||||||
import { DepositContainer } from '@vegaprotocol/deposits';
|
import { DepositContainer } from '@vegaprotocol/deposits';
|
||||||
import { normalizeFormatNumber, t } from '@vegaprotocol/react-helpers';
|
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 React from 'react';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
@ -26,8 +26,14 @@ export const ValidateMargin = ({
|
|||||||
className="flex flex-col center pb-3"
|
className="flex flex-col center pb-3"
|
||||||
data-testid="deal-ticket-margin-invalidated"
|
data-testid="deal-ticket-margin-invalidated"
|
||||||
>
|
>
|
||||||
<p>
|
<p className="mb-2">
|
||||||
{t("You don't have enough margin available to open this position.")}
|
{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>
|
||||||
<p>
|
<p>
|
||||||
{`${normalizeFormatNumber(margin, decimals)} ${symbol} ${t(
|
{`${normalizeFormatNumber(margin, decimals)} ${symbol} ${t(
|
||||||
@ -36,15 +42,6 @@ export const ValidateMargin = ({
|
|||||||
'available'
|
'available'
|
||||||
)}`}
|
)}`}
|
||||||
</p>
|
</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>
|
</div>
|
||||||
<Dialog open={depositDialog} onChange={setDepositDialog}>
|
<Dialog open={depositDialog} onChange={setDepositDialog}>
|
||||||
<h1 className="text-2xl mb-4">{t('Deposit')}</h1>
|
<h1 className="text-2xl mb-4">{t('Deposit')}</h1>
|
||||||
|
Loading…
Reference in New Issue
Block a user