Skip to content

Commit

Permalink
Merge pull request #1937 from oasisprotocol/lw/tx-building-text-size
Browse files Browse the repository at this point in the history
Fix transaction preview layout in extension and loading text size
  • Loading branch information
lukaw3d authored May 15, 2024
2 parents 2ebd0f5 + 31a780b commit dd2ba1f
Showing 7 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions .changelog/1937.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce loading text size
2 changes: 1 addition & 1 deletion src/app/components/Persist/PersistLoadingGate.tsx
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ export function PersistLoadingGate(props: Props) {
<Layer modal background="background-front" responsive={false}>
<Box pad="medium" gap="medium" direction="row" align="center">
<Spinner size="medium" />
<Text size="large">{t('persist.loading', 'Loading')}</Text>
<Text size="medium">{t('persist.loading', 'Loading')}</Text>
</Box>
</Layer>
)}
6 changes: 3 additions & 3 deletions src/app/components/TransactionModal/index.tsx
Original file line number Diff line number Diff line change
@@ -107,19 +107,19 @@ export function TransactionModal() {
{step === TransactionStep.Building && (
<Box direction="row" align="center" gap="medium">
<Spinner size="medium" />
<Text size="large">{t('transaction.step.building', 'Building transaction')}</Text>
<Text size="medium">{t('transaction.step.building', 'Building transaction')}</Text>
</Box>
)}
{step === TransactionStep.Signing && (
<Box direction="row" align="center" gap="medium">
<Spinner size="medium" />
<Text size="large">{t('transaction.step.signing', 'Signing transaction')}</Text>
<Text size="medium">{t('transaction.step.signing', 'Signing transaction')}</Text>
</Box>
)}
{step === TransactionStep.Submitting && (
<Box direction="row" align="center" gap="medium">
<Spinner size="medium" />
<Text size="large">{t('transaction.step.submitting', 'Submitting transaction')}</Text>
<Text size="medium">{t('transaction.step.submitting', 'Submitting transaction')}</Text>
</Box>
)}
</Box>
7 changes: 3 additions & 4 deletions src/app/components/TransactionTypeFormatter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { NewTransactionType } from 'app/state/transaction/types'
import React, { memo } from 'react'
import { useTranslation } from 'react-i18next'
import { Box } from 'grommet/es6/components/Box'
import { Text } from 'grommet/es6/components/Text'

interface Props {
@@ -20,13 +19,13 @@ export const TransactionTypeFormatter = memo((props: Props) => {

const typeMessage = typeMap[type]
return (
<Box direction="row" align="center" gap="xsmall">
<span>
<Text color="grayMedium" size="small" style={{ textTransform: 'capitalize', fontWeight: 600 }}>
{type}
</Text>
<Text color="grayMedium" size="xsmall" style={{ letterSpacing: 0 }}>
({typeMessage})
&nbsp;({typeMessage})
</Text>
</Box>
</span>
)
})
4 changes: 2 additions & 2 deletions src/app/pages/AccountPage/index.tsx
Original file line number Diff line number Diff line change
@@ -108,9 +108,9 @@ export function AccountPage(props: AccountPageProps) {
{active && <TransactionModal />}
{(stake.loading || account.loading) && (
<Layer modal background="background-front" responsive={false}>
<Box pad="medium" gap="medium" direction="row" align="center">
<Box pad="medium" gap="medium" direction="row" align="center" width="max-content">
<Spinner size="medium" />
<Text size="large">{t('account.loading', 'Loading account')}</Text>
<Text size="medium">{t('account.loading', 'Loading account')}</Text>
</Box>
</Layer>
)}
Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ export function ImportAccountsSelectionModal(props: ImportAccountsSelectionModal
<Box direction="row" gap="medium" alignContent="center" pad={{ top: 'small' }}>
<Spinner size="medium" />
<Box alignSelf="center">
<Text size="xlarge">
<Text size="medium">
<ImportAccountsStepFormatter step={importAccounts.step} />
</Text>
</Box>
2 changes: 1 addition & 1 deletion src/app/pages/ParaTimesPage/ParaTimeFormFooter/index.tsx
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ export const ParaTimeFormFooter = ({
label={secondaryLabel || t('paraTimes.footer.back', 'Back')}
onClick={secondaryAction}
plain
style={{ textAlign: 'center', fontSize: '14px', textDecoration: 'underline', color: 'brand' }}
style={{ textAlign: 'center', fontSize: '14px', textDecoration: 'underline' }}
/>
)}
</Box>

0 comments on commit dd2ba1f

Please sign in to comment.