Skip to content

Commit

Permalink
Improve Transaction modal
Browse files Browse the repository at this point in the history
  • Loading branch information
mvaivre committed Oct 16, 2024
1 parent d355c71 commit b790895
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 23 deletions.
2 changes: 1 addition & 1 deletion apps/mobile-wallet/src/features/modals/BottomModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const BottomModal = ({
})

return (
<BottomModalBase modalId={modalId} title={title} {...modalState}>
<BottomModalBase modalId={modalId} title={title} navHeight={navHeight} {...modalState}>
<AnimatedScrollView
onContentSizeChange={modalState.handleContentSizeChange}
keyboardShouldPersistTaps="handled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const BottomModalFlashList = ({
})

return (
<BottomModalBase title={title} modalId={modalId} {...modalState}>
<BottomModalBase title={title} modalId={modalId} navHeight={navHeight} {...modalState}>
{children({
...modalState.contentScrollHandlers,
onContentSizeChange: modalState.handleContentSizeChange,
Expand Down
6 changes: 5 additions & 1 deletion apps/mobile-wallet/src/features/modals/BottomModalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ interface BottomModalHeaderProps {
const BottomModalHeader = ({ height, handleClose, title }: BottomModalHeaderProps) => (
<HeaderContainer style={{ height }}>
<HeaderSideContainer align="left" />
{title && <Title semiBold>{title}</Title>}
{title && (
<Title semiBold size={16}>
{title}
</Title>
)}
<HeaderSideContainer align="right">
<CloseButton onPress={handleClose} compact />
</HeaderSideContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import AppText from '~/components/AppText'
import Button from '~/components/buttons/Button'
import IOList from '~/components/IOList'
import BoxSurface from '~/components/layout/BoxSurface'
import { ModalScreenTitle, ScreenSection } from '~/components/layout/Screen'
import NFTThumbnail from '~/components/NFTThumbnail'
import Row from '~/components/Row'
import BottomModal from '~/features/modals/BottomModal'
Expand Down Expand Up @@ -60,18 +59,7 @@ const TransactionModal = withModal<TransactionModalProps>(({ id, tx }) => {
const openNftGridModal = () => dispatch(openModal({ name: 'NftGridModal', props: { nftsData } }))

return (
<BottomModal modalId={id} contentVerticalGap>
<ScreenSectionStyled>
<ModalScreenTitle>{t('Transaction')}</ModalScreenTitle>
<Button
iconProps={{ name: 'arrow-up-right' }}
onPress={() => openBrowserAsync(explorerTxUrl)}
variant="accent"
compact
title={t('Explorer')}
/>
</ScreenSectionStyled>

<BottomModal modalId={id} contentVerticalGap title={t('Transaction')}>
<BoxSurface type="highlight">
<Row title={t('Amount')} noMaxWidth transparent>
{tokensWithSymbol.map(({ id, amount, decimals, symbol }) => (
Expand Down Expand Up @@ -149,6 +137,11 @@ const TransactionModal = withModal<TransactionModalProps>(({ id, tx }) => {
</Row>
)}
</BoxSurface>
<Button
iconProps={{ name: 'arrow-up-right' }}
onPress={() => openBrowserAsync(explorerTxUrl)}
title={t('Explorer')}
/>
</BottomModal>
)
})
Expand All @@ -163,13 +156,6 @@ const AppTextStyled = styled(AppText)`
text-align: right;
`

const ScreenSectionStyled = styled(ScreenSection)`
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 10px;
`

const TokenId = styled.View`
max-width: 60px;
`
Expand Down

0 comments on commit b790895

Please sign in to comment.