fix: format last price and shrink 0 on warning icon
This commit is contained in:
parent
edfb0a4e37
commit
21d14c5e0b
@ -4,7 +4,11 @@ import {
|
|||||||
VegaWalletOrderType,
|
VegaWalletOrderType,
|
||||||
VegaWalletOrderTimeInForce,
|
VegaWalletOrderTimeInForce,
|
||||||
} from '@vegaprotocol/wallet';
|
} from '@vegaprotocol/wallet';
|
||||||
import { t, addDecimal, toDecimal } from '@vegaprotocol/react-helpers';
|
import {
|
||||||
|
t,
|
||||||
|
toDecimal,
|
||||||
|
addDecimalsFormatNumber,
|
||||||
|
} from '@vegaprotocol/react-helpers';
|
||||||
import { Button, InputError } from '@vegaprotocol/ui-toolkit';
|
import { Button, InputError } from '@vegaprotocol/ui-toolkit';
|
||||||
import { TypeSelector } from './type-selector';
|
import { TypeSelector } from './type-selector';
|
||||||
import { SideSelector } from './side-selector';
|
import { SideSelector } from './side-selector';
|
||||||
@ -83,7 +87,10 @@ export const DealTicket = ({
|
|||||||
register={register}
|
register={register}
|
||||||
price={
|
price={
|
||||||
market.depth.lastTrade
|
market.depth.lastTrade
|
||||||
? addDecimal(market.depth.lastTrade.price, market.decimalPlaces)
|
? addDecimalsFormatNumber(
|
||||||
|
market.depth.lastTrade.price,
|
||||||
|
market.decimalPlaces
|
||||||
|
)
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
quoteName={market.tradableInstrument.instrument.product.quoteName}
|
quoteName={market.tradableInstrument.instrument.product.quoteName}
|
||||||
|
@ -17,6 +17,7 @@ export const Icon = ({ size = 16, name, className, ariaLabel }: IconProps) => {
|
|||||||
'fill-current',
|
'fill-current',
|
||||||
'align-text-bottom',
|
'align-text-bottom',
|
||||||
'fill-current',
|
'fill-current',
|
||||||
|
'shrink-0',
|
||||||
{
|
{
|
||||||
'w-20': size === 20,
|
'w-20': size === 20,
|
||||||
'h-20': size === 20,
|
'h-20': size === 20,
|
||||||
|
@ -21,7 +21,6 @@ export const InputError = ({
|
|||||||
'flex',
|
'flex',
|
||||||
'items-center',
|
'items-center',
|
||||||
'box-border',
|
'box-border',
|
||||||
'h-28',
|
|
||||||
'border-l-4',
|
'border-l-4',
|
||||||
'text-black-95 dark:text-white-95',
|
'text-black-95 dark:text-white-95',
|
||||||
'text-ui',
|
'text-ui',
|
||||||
@ -44,7 +43,7 @@ export const InputError = ({
|
|||||||
{...props}
|
{...props}
|
||||||
role="alert"
|
role="alert"
|
||||||
>
|
>
|
||||||
<Icon name="warning-sign" className={iconClassName} />
|
<Icon name="warning-sign" size={16} className={iconClassName} />
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user