Skip to content

Commit

Permalink
style: tweak TokenInfo styles (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwoktung authored Dec 27, 2022
1 parent 6fc9bd3 commit 3f9eba9
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const HeaderSmall: FC = () => {
size="base"
name="MagnifyingGlassMini"
type="plain"
iconSize={16}
// iconSize={16}
onPress={() => {
showMarketSearch({
modalProps: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ const TransactionRate: FC<TransactionRateProps> = ({
const symbolB = tokenB.symbol;
let title = '';
if (!isSwitched) {
title = `1${symbolA}${formatRateAmount(rate)}${symbolB}`;
title = `1 ${symbolA}${formatRateAmount(rate)} ${symbolB}`;
} else {
title = `1${symbolB}${formatRateAmount(1 / Number(rate))}${symbolA}`;
title = `1 ${symbolB}${formatRateAmount(1 / Number(rate))} ${symbolA}`;
}

return (
Expand Down
135 changes: 71 additions & 64 deletions packages/kit/src/views/TokenDetail/TokenInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,70 +244,77 @@ const TokenInfo: FC<TokenInfoProps> = ({ token, priceReady }) => {
{intl.formatMessage({ id: 'title__swap' })}
</Typography.CaptionStrong>
</Box>

{cryptoCurrency && (
<Box flex={1} mx={3} minW="56px" alignItems="center">
<IconButton
circle
size={isVertical ? 'xl' : 'lg'}
name="PlusOutline"
type="basic"
isDisabled={wallet?.type === 'watching'}
onPress={() => {
navigation.navigate(RootRoutes.Modal, {
screen: ModalRoutes.FiatPay,
params: {
screen: FiatPayRoutes.AmountInputModal,
params: {
token: cryptoCurrency as CurrencyType,
type: 'Buy',
},
},
});
}}
/>
<Typography.CaptionStrong
textAlign="center"
mt="8px"
color={
wallet?.type === 'watching' ? 'text-disabled' : 'text-default'
}
>
{intl.formatMessage({ id: 'action__buy' })}
</Typography.CaptionStrong>
</Box>
)}
{sellEnable && (
<Box flex={1} mx={3} minW="56px" alignItems="center">
<IconButton
circle
size={isVertical ? 'xl' : 'lg'}
name="CurrencyDollarOutline"
type="basic"
isDisabled={wallet?.type === 'watching'}
onPress={() => {
navigation.navigate(RootRoutes.Modal, {
screen: ModalRoutes.FiatPay,
params: {
screen: FiatPayRoutes.AmountInputModal,
params: {
token: cryptoCurrency as CurrencyType,
type: 'Sell',
},
},
});
}}
/>
<Typography.CaptionStrong
textAlign="center"
mt="8px"
color={
wallet?.type === 'watching' ? 'text-disabled' : 'text-default'
}
>
{intl.formatMessage({ id: 'action__sell' })}
</Typography.CaptionStrong>
</Box>
{isVertical ? null : (
<>
{cryptoCurrency && (
<Box flex={1} mx={3} minW="56px" alignItems="center">
<IconButton
circle
size={isVertical ? 'xl' : 'lg'}
name="PlusOutline"
type="basic"
isDisabled={wallet?.type === 'watching'}
onPress={() => {
navigation.navigate(RootRoutes.Modal, {
screen: ModalRoutes.FiatPay,
params: {
screen: FiatPayRoutes.AmountInputModal,
params: {
token: cryptoCurrency as CurrencyType,
type: 'Buy',
},
},
});
}}
/>
<Typography.CaptionStrong
textAlign="center"
mt="8px"
color={
wallet?.type === 'watching'
? 'text-disabled'
: 'text-default'
}
>
{intl.formatMessage({ id: 'action__buy' })}
</Typography.CaptionStrong>
</Box>
)}
{sellEnable && (
<Box flex={1} mx={3} minW="56px" alignItems="center">
<IconButton
circle
size={isVertical ? 'xl' : 'lg'}
name="CurrencyDollarOutline"
type="basic"
isDisabled={wallet?.type === 'watching'}
onPress={() => {
navigation.navigate(RootRoutes.Modal, {
screen: ModalRoutes.FiatPay,
params: {
screen: FiatPayRoutes.AmountInputModal,
params: {
token: cryptoCurrency as CurrencyType,
type: 'Sell',
},
},
});
}}
/>
<Typography.CaptionStrong
textAlign="center"
mt="8px"
color={
wallet?.type === 'watching'
? 'text-disabled'
: 'text-default'
}
>
{intl.formatMessage({ id: 'action__sell' })}
</Typography.CaptionStrong>
</Box>
)}
</>
)}
{priceReady && !isVertical && (
<Box flex={1} mx={3} minW="56px" alignItems="center">
Expand Down

0 comments on commit 3f9eba9

Please sign in to comment.