Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part of #17670: Replace Typography with Text component #18569

Merged
merged 4 commits into from
Apr 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ import {
DEFAULT_ROUTE,
BUILD_QUOTE_ROUTE,
} from '../../../helpers/constants/routes';
import Typography from '../../../components/ui/typography';
import { Text } from '../../../components/component-library';
import Box from '../../../components/ui/box';
import UrlIcon from '../../../components/ui/url-icon';
import {
BLOCK_SIZES,
TypographyVariant,
TextVariant,
JustifyContent,
DISPLAY,
FONT_WEIGHT,
Expand Down Expand Up @@ -330,21 +330,17 @@ export default function SmartTransactionStatusPage() {
justifyContent={JustifyContent.center}
alignItems={AlignItems.center}
>
<Typography
color={TextColor.textAlternative}
variant={TypographyVariant.H6}
>
<Text color={TextColor.textAlternative} variant={TextVariant.bodySm}>
{`${fetchParams?.value && Number(fetchParams.value).toFixed(5)} `}
</Typography>
<Typography
</Text>
<Text
color={TextColor.textAlternative}
variant={TypographyVariant.H6}
fontWeight={FONT_WEIGHT.BOLD}
variant={TextVariant.bodySmBold}
boxProps={{ marginLeft: 1, marginRight: 2 }}
>
{fetchParamsSourceTokenInfo.symbol ??
latestSmartTransaction?.sourceTokenSymbol}
</Typography>
</Text>
{fetchParamsSourceTokenInfo.iconUrl ? (
<UrlIcon
url={fetchParamsSourceTokenInfo.iconUrl}
Expand All @@ -370,22 +366,21 @@ export default function SmartTransactionStatusPage() {
fallbackClassName="main-quote-summary__icon-fallback"
/>
) : null}
<Typography
<Text
color={TextColor.textAlternative}
variant={TypographyVariant.H6}
variant={TextVariant.bodySm}
boxProps={{ marginLeft: 2 }}
>
{`~${destinationValue && Number(destinationValue).toFixed(5)} `}
</Typography>
<Typography
</Text>
<Text
color={TextColor.textAlternative}
variant={TypographyVariant.H6}
fontWeight={FONT_WEIGHT.BOLD}
variant={TextVariant.bodySmBold}
boxProps={{ marginLeft: 1 }}
>
{fetchParamsDestinationTokenInfo.symbol ??
latestSmartTransaction?.destinationTokenSymbol}
</Typography>
</Text>
</Box>
<Box
marginTop={3}
Expand All @@ -405,31 +400,30 @@ export default function SmartTransactionStatusPage() {
alignItems={AlignItems.center}
>
<TimerIcon />
<Typography
<Text
color={TextColor.textAlternative}
variant={TypographyVariant.H6}
variant={TextVariant.bodySm}
boxProps={{ marginLeft: 1 }}
>
{`${t('stxSwapCompleteIn')} `}
</Typography>
<Typography
</Text>
<Text
color={TextColor.textAlternative}
variant={TypographyVariant.H6}
fontWeight={FONT_WEIGHT.BOLD}
variant={TextVariant.bodySmBold}
boxProps={{ marginLeft: 1 }}
className="smart-transaction-status__remaining-time"
>
{showRemainingTimeInMinAndSec(timeLeftForPendingStxInSec)}
</Typography>
</Text>
</Box>
)}
<Typography
<Text
color={TextColor.textDefault}
variant={TypographyVariant.H4}
variant={TextVariant.headingSm}
fontWeight={FONT_WEIGHT.BOLD}
>
{headerText}
</Typography>
</Text>
{isSmartTransactionPending && (
<div className="smart-transaction-status__loading-bar-container">
<div
Expand All @@ -445,13 +439,13 @@ export default function SmartTransactionStatusPage() {
</div>
)}
{description && (
<Typography
variant={TypographyVariant.H6}
<Text
variant={TextVariant.bodySm}
boxProps={{ ...(blockExplorerUrl && { margin: [1, 0, 0] }) }}
color={TextColor.textAlternative}
>
{description}
</Typography>
</Text>
)}
{blockExplorerUrl && (
<ViewOnBlockExplorer
Expand All @@ -464,13 +458,13 @@ export default function SmartTransactionStatusPage() {
className="smart-transaction-status__background-animation smart-transaction-status__background-animation--bottom"
/>
{subDescription && (
<Typography
variant={TypographyVariant.H7}
<Text
variant={TextVariant.bodySm}
boxProps={{ marginTop: 8 }}
color={TextColor.textAlternative}
>
{subDescription}
</Typography>
</Text>
)}
</Box>
{showCancelSwapLink &&
Expand Down