Skip to content

Commit

Permalink
tweak layout
Browse files Browse the repository at this point in the history
  • Loading branch information
bryzettler committed Sep 14, 2023
1 parent 98b1ab8 commit 4245ba5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions src/components/TokenPill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useMetaplexMetadata } from '@hooks/useMetaplexMetadata'
import { PublicKey } from '@solana/web3.js'
import { useCreateOpacity } from '@theme/themeHooks'
import React, { memo, useCallback } from 'react'
import { Pressable } from 'react-native'
import { Pressable, ViewStyle } from 'react-native'
import CarotDown from '../assets/images/carotDownFull.svg'

export const TokenPill = memo(
Expand All @@ -14,11 +14,13 @@ export const TokenPill = memo(
hasCarot = false,
isActive = false,
onPress,
...rest
}: {
mint: PublicKey
hasCarot?: boolean
isActive?: boolean
onPress: () => void
style?: ViewStyle | undefined
}) => {
const { symbol, json } = useMetaplexMetadata(mint)
const { backgroundStyle: generateBackgroundStyle } = useCreateOpacity()
Expand All @@ -37,11 +39,14 @@ export const TokenPill = memo(
)

return (
<Box flexDirection="row">
<Box flexDirection="row" flex={1} justifyContent="center">
<Pressable onPress={onPress}>
{({ pressed }) => (
<Box
style={getBackgroundColorStylePill({ active: isActive, pressed })}
style={[
getBackgroundColorStylePill({ active: isActive, pressed }),
rest.style ? rest.style : {},
]}
height={45}
borderRadius="round"
flexDirection="row"
Expand Down
4 changes: 2 additions & 2 deletions src/features/modals/InsufficientSolConversionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const InsufficientSOLConversionModal: FC = () => {

const validInputMints = useMemo(
() =>
[MOBILE_MINT, HNT_MINT, IOT_MINT].filter((key) =>
[HNT_MINT, MOBILE_MINT, IOT_MINT].filter((key) =>
visibleTokens.has(key.toBase58()),
),
[visibleTokens],
Expand Down Expand Up @@ -78,7 +78,7 @@ const InsufficientSOLConversionModal: FC = () => {
</Text>
<Box
flexDirection="row"
justifyContent="space-around"
justifyContent="space-between"
marginTop="xxl"
>
{validInputMints.map((mint) => (
Expand Down

0 comments on commit 4245ba5

Please sign in to comment.