mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Typography to text (#18382)
* Typography to text * Update README.md * Update README.md * minor changes in custom file * minor change * Resolved Conflict issues --------- Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
This commit is contained in:
parent
a816a6e592
commit
18ff108627
@ -6,16 +6,14 @@ import BigNumber from 'bignumber.js';
|
||||
import { I18nContext } from '../../../contexts/i18n';
|
||||
import Box from '../../ui/box';
|
||||
import FormField from '../../ui/form-field';
|
||||
import Typography from '../../ui/typography';
|
||||
import { Text, ButtonLink } from '../../component-library';
|
||||
import { Icon, ICON_NAMES } from '../../component-library/icon/deprecated';
|
||||
import { ButtonLink } from '../../component-library';
|
||||
import {
|
||||
AlignItems,
|
||||
DISPLAY,
|
||||
FLEX_DIRECTION,
|
||||
TEXT_ALIGN,
|
||||
FONT_WEIGHT,
|
||||
TypographyVariant,
|
||||
TextVariant,
|
||||
JustifyContent,
|
||||
Size,
|
||||
BLOCK_SIZES,
|
||||
@ -72,14 +70,14 @@ export default function CustomSpendingCap({
|
||||
return {
|
||||
className: 'custom-spending-cap__lowerValue',
|
||||
description: t('inputLogicEqualOrSmallerNumber', [
|
||||
<Typography
|
||||
<Text
|
||||
key="custom-spending-cap"
|
||||
variant={TypographyVariant.H6}
|
||||
fontWeight={FONT_WEIGHT.BOLD}
|
||||
variant={TextVariant.bodySmBold}
|
||||
as="h6"
|
||||
className="custom-spending-cap__input-value-and-token-name"
|
||||
>
|
||||
{replaceCommaToDot(inputNumber)} {tokenName}
|
||||
</Typography>,
|
||||
</Text>,
|
||||
]),
|
||||
};
|
||||
} else if (decConversionGreaterThan(inputNumber, currentTokenBalance)) {
|
||||
@ -146,14 +144,14 @@ export default function CustomSpendingCap({
|
||||
currentTokenBalance,
|
||||
)
|
||||
? t('warningTooltipText', [
|
||||
<Typography
|
||||
<Text
|
||||
key="tooltip-text"
|
||||
variant={TypographyVariant.H7}
|
||||
fontWeight={FONT_WEIGHT.BOLD}
|
||||
variant={TextVariant.bodySmBold}
|
||||
as="h6"
|
||||
color={TextColor.errorDefault}
|
||||
>
|
||||
<Icon name={ICON_NAMES.WARNING} /> {t('beCareful')}
|
||||
</Typography>,
|
||||
</Text>,
|
||||
])
|
||||
: t('inputLogicEmptyState');
|
||||
|
||||
@ -250,15 +248,17 @@ export default function CustomSpendingCap({
|
||||
'custom-spending-cap__description--with-error-message': error,
|
||||
})}
|
||||
>
|
||||
<Typography
|
||||
<Text
|
||||
color={TextColor.textDefault}
|
||||
variant={TypographyVariant.H7}
|
||||
boxProps={{ paddingTop: 2, paddingBottom: 2 }}
|
||||
variant={TextVariant.bodySm}
|
||||
as="h6"
|
||||
paddingTop={2}
|
||||
paddingBottom={2}
|
||||
>
|
||||
{replaceCommaToDot(value)
|
||||
? customSpendingCapText
|
||||
: inputLogicEmptyStateText}
|
||||
</Typography>
|
||||
</Text>
|
||||
</Box>
|
||||
</label>
|
||||
</Box>
|
||||
|
Loading…
Reference in New Issue
Block a user