Skip to content
Open
Show file tree
Hide file tree
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
Binary file added assets/img/home/offers/amc-cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"My Wallets": "Meine Wallets",
"Other Keys": "Andere Tasten",
"Connect to Coinbase": "Mit Coinbase verbinden",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "Verwalten Sie Ihre Coinbase-Konten, prüfen Sie Kontostände, Einzahlungen und Abhebungen zwischen Wallets.",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "Verwalten Sie Ihre Coinbase-Konten, prüfen Sie Kontostände, Einzahlungen und Abhebungen zwischen Wallets.",
"Connect": "Verbinden",
"Sign Up for Coinbase": "Anmeldung bei Coinbase",
"It's a ghost town in here": "Hier herrscht geisterhafte Stille",
Expand Down
2 changes: 1 addition & 1 deletion locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
"My Wallets": "My Wallets",
"Other Keys": "Other Keys",
"Connect to Coinbase": "Connect to Coinbase",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.",
"Connect": "Connect",
"Sign Up for Coinbase": "Sign Up for Coinbase",
"It's a ghost town in here": "It's a ghost town in here",
Expand Down
2 changes: 1 addition & 1 deletion locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"My Wallets": "Mis billeteras",
"Other Keys": "Otras claves",
"Connect to Coinbase": "Conectar a Coinbase",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "Administre sus cuentas de Coinbase, compruebe los balances, deposite y retire fondos entre billeteras.",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "Administre sus cuentas de Coinbase, compruebe los balances, deposite y retire fondos entre billeteras.",
"Connect": "Conectar",
"Sign Up for Coinbase": "Registrarse en Coinbase",
"It's a ghost town in here": "Esto es un pueblo fantasma",
Expand Down
2 changes: 1 addition & 1 deletion locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"My Wallets": "Mes portefeuilles",
"Other Keys": "Autres clés",
"Connect to Coinbase": "Connectez-vous à Coinbase",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "Gérez vos comptes Coinbase, vérifiez les soldes, les dépôts et les retraits de fonds entre les portefeuilles.",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "Gérez vos comptes Coinbase, vérifiez les soldes, les dépôts et les retraits de fonds entre les portefeuilles.",
"Connect": "Connecter",
"Sign Up for Coinbase": "S'inscrire à Coinbase",
"It's a ghost town in here": "C'est une ville fantôme ici",
Expand Down
2 changes: 1 addition & 1 deletion locales/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"My Wallets": "マイウォレット",
"Other Keys": "その他の鍵",
"Connect to Coinbase": "Coinbaseに接続",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "Coinbaseアカウントを管理し、残高を確認し、ウォレット間で資産を移動。",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "Coinbaseアカウントを管理し、残高を確認し、ウォレット間で資産を移動。",
"Connect": "接続する",
"Sign Up for Coinbase": "Coinbaseに口座開設",
"It's a ghost town in here": "ここはゴーストタウンです",
Expand Down
2 changes: 1 addition & 1 deletion locales/nl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"My Wallets": "Mijn wallets",
"Other Keys": "Andere keys",
"Connect to Coinbase": "Verbinden met Coinbase",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "Beheer uw Coinbase-accounts, controleer saldi, stortingen en neem geld op tussen wallets.",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "Beheer uw Coinbase-accounts, controleer saldi, stortingen en neem geld op tussen wallets.",
"Connect": "Verbinden",
"Sign Up for Coinbase": "Aanmelden voor Coinbase",
"It's a ghost town in here": "Het is hier een spookstad",
Expand Down
2 changes: 1 addition & 1 deletion locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"My Wallets": "As minhas carteiras",
"Other Keys": "Outras chaves",
"Connect to Coinbase": "Conectar à Coinbase",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "Gira as suas contas da Coinbase, consulte saldos, depósitos e levante fundos entre carteiras.",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "Gira as suas contas da Coinbase, consulte saldos, depósitos e levante fundos entre carteiras.",
"Connect": "Conectar",
"Sign Up for Coinbase": "Inscreva-se na Coinbase",
"It's a ghost town in here": "Este é um problema fantasma",
Expand Down
2 changes: 1 addition & 1 deletion locales/ru/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"My Wallets": "Мои кошельки",
"Other Keys": "Другие ключи",
"Connect to Coinbase": "Подключиться к Coinbase",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "Управляйте своими аккаунтами Coinbase, проверяйте и пополняйте баланс, а также переводите средства между кошельками.",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "Управляйте своими аккаунтами Coinbase, проверяйте и пополняйте баланс, а также переводите средства между кошельками.",
"Connect": "Подключиться",
"Sign Up for Coinbase": "Зарегистрироваться в Coinbase",
"It's a ghost town in here": "Здесь пусто",
Expand Down
2 changes: 1 addition & 1 deletion locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"My Wallets": "我的钱包",
"Other Keys": "其他密钥",
"Connect to Coinbase": "连接到 Coinbase",
"Manage your Coinbase accounts, check balances, deposits and withdraw funds between wallets.": "管理您的 Coinbase 账户,查看余额、存款,在不同钱包之间提款。",
"Manage your Coinbase accounts, check balances, deposit and withdraw funds between wallets.": "管理您的 Coinbase 账户,查看余额、存款,在不同钱包之间提款。",
"Connect": "连接",
"Sign Up for Coinbase": "注册 Coinbase",
"It's a ghost town in here": "这里什么都没有",
Expand Down
6 changes: 3 additions & 3 deletions src/components/avatar/ProfileIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import * as Svg from 'react-native-svg';
import {useTheme} from 'styled-components/native';
import {Midnight, ProgressBlue} from '../../styles/colors';
import {Action, LightBlue, Midnight} from '../../styles/colors';

interface ProfileIconProps {
color?: Svg.Color;
Expand All @@ -14,8 +14,8 @@ const ProfileIcon: React.FC<ProfileIconProps> = props => {
const theme = useTheme();

size = size || 35;
color = color || (theme.dark ? '#4989FF' : '#9FAFF5');
background = background || (theme.dark ? Midnight : ProgressBlue);
color = color || (theme.dark ? '#4989FF' : Action);
background = background || (theme.dark ? Midnight : LightBlue);

return (
<Svg.Svg width={size} height={size} viewBox="0 0 50 50" fill="none">
Expand Down
33 changes: 29 additions & 4 deletions src/components/back/HeaderBackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import React from 'react';
import {TouchableOpacity} from 'react-native-gesture-handler';
import Svg, {Path} from 'react-native-svg';
import {useNavigation} from '@react-navigation/native';
import Back from './Back';
import styled, {useTheme} from 'styled-components/native';
import {ActiveOpacity} from '../base/TouchableOpacity';
import {LightBlack, NeutralSlate, Slate, SlateDark} from '../../styles/colors';

const Circle = styled.View`
width: 40px;
height: 40px;
border-radius: 20px;
align-items: center;
justify-content: center;
background-color: ${({theme}) => (theme.dark ? LightBlack : NeutralSlate)};
`;

const BackTouchable = styled(TouchableOpacity)`
padding-right: 10px;
`;

interface HeaderBackButtonProps {
onPress?: () => void;
}

const HeaderBackButton: React.FC<HeaderBackButtonProps> = ({onPress}) => {
const navigation = useNavigation();
const theme = useTheme();

const handlePress = () => {
if (onPress) {
Expand All @@ -18,10 +35,18 @@ const HeaderBackButton: React.FC<HeaderBackButtonProps> = ({onPress}) => {
}
};

const arrowFill = theme.dark ? Slate : SlateDark;
return (
<TouchableOpacity onPress={handlePress} style={{paddingRight: 10}}>
<Back opacity={1} />
</TouchableOpacity>
<BackTouchable onPress={handlePress} activeOpacity={ActiveOpacity}>
<Circle>
<Svg width={15} height={15} viewBox="0 0 15 15" fill="none">
<Path
d="M2.873 8.25L8.56925 13.9462L7.5 15L0 7.5L7.5 0L8.56925 1.05375L2.873 6.75H15V8.25H2.873Z"
fill={arrowFill}
/>
</Svg>
</Circle>
</BackTouchable>
);
};

Expand Down
4 changes: 4 additions & 0 deletions src/components/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ const CardBody = styled.View`
`;

const CardFooter = styled.View`
flex-direction: row;
align-items: center;
justify-content: flex-end;
min-height: 30px;
padding: ${CardGutter};
width: 100%;
`;

const BackgroundImage = styled.View`
Expand Down
4 changes: 2 additions & 2 deletions src/components/chain-search/ChainSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SearchRoundInput,
} from '../../components/styled/Containers';
import _ from 'lodash';
import {Action, Slate, White} from '../../styles/colors';
import {Action, LightBlue, Slate, White} from '../../styles/colors';
import {BaseText} from '../../components/styled/Text';
import SearchSvg from '../../../assets/img/search.svg';
import ChevronDownSvgLight from '../../../assets/img/chevron-down-lightmode.svg';
Expand Down Expand Up @@ -44,7 +44,7 @@ export const SearchFilterContainer = styled(TouchableOpacity)`
height: 32px;
margin: auto 8px auto 15px;
border: 1px solid ${({theme: {dark}}) => (dark ? Action : 'transparent')};
background: ${({theme: {dark}}) => (dark ? '#2240C440' : '#ECEFFD')};
background: ${({theme: {dark}}) => (dark ? '#2240C440' : LightBlue)};
`;

export const RowFilterContainer = styled.View`
Expand Down
70 changes: 21 additions & 49 deletions src/components/home-card/HomeCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import {ReactElement, ReactNode} from 'react';
import styled, {useTheme} from 'styled-components/native';
import {Action, LightBlack, Slate, SlateDark, White} from '../../styles/colors';
import {LightBlack, Slate30, SlateDark, White} from '../../styles/colors';
import Haptic from '../haptic-feedback/haptic';
import {
ActiveOpacity,
Expand All @@ -13,23 +13,10 @@ import Card from '../card/Card';
import Percentage from '../percentage/Percentage';
import {View} from 'react-native';
import {BaseText, H3} from '../styled/Text';
import * as Svg from 'react-native-svg';
import {shouldScale} from '../../utils/helper-methods';
import {useTranslation} from 'react-i18next';
import {TouchableOpacity} from '@components/base/TouchableOpacity';

const Arrow = ({isDark}: {isDark: boolean}) => {
return (
<Svg.Svg width="17" height="17" viewBox="0 0 17 17" fill="none">
<Svg.Path
fill={isDark ? '#4F6EF7' : Action}
fillRule="evenodd"
clipRule="evenodd"
d="M9.65108 2.83329L8.4115 4.01737L12.2188 7.65419L1.41671 7.65419V9.34573L12.2188 9.34573L8.4115 12.9825L9.65108 14.1666L15.5834 8.49996L9.65108 2.83329Z"
/>
</Svg.Svg>
);
};
import ArrowRightSvg from '../../navigation/tabs/home/components/ArrowRightSvg';

interface BodyProps {
title?: string;
Expand All @@ -42,20 +29,16 @@ interface BodyProps {
}

interface HomeCardProps {
header?: ReactNode;
body: BodyProps;
footer?: ReactNode;
onCTAPress?: () => void;
backgroundImg?: () => ReactElement;
}

const CardHeader = styled.View`
min-height: 20px;
`;

const CardBodyHeader = styled(BaseText)`
font-size: 14px;
line-height: 21px;
color: ${({theme: {dark}}) => (dark ? Slate : SlateDark)};
font-size: 12px;
line-height: 15px;
color: ${({theme: {dark}}) => (dark ? Slate30 : SlateDark)};
margin-top: ${CardGutter};
`;

Expand Down Expand Up @@ -88,16 +71,6 @@ const CardPillText = styled(BaseText)`
color: ${SlateDark};
`;

const FooterArrow = styled(TouchableOpacity)`
width: 35px;
height: 35px;
align-self: flex-end;
border-radius: 50px;
background-color: ${({theme}) => (theme.dark ? '#0C204E' : '#ECEFFD')};
align-items: center;
justify-content: center;
`;

const CardContainer = styled(TouchableOpacity)`
left: ${ScreenGutter};
`;
Expand All @@ -107,14 +80,17 @@ export const NeedBackupText = styled(BaseText)`
text-align: center;
color: ${({theme: {dark}}) => (dark ? White : SlateDark)};
padding: 2px 4px;
border: 1px solid ${({theme: {dark}}) => (dark ? White : '#E1E4E7')};
border: 1px solid ${({theme: {dark}}) => (dark ? SlateDark : Slate30)};
border-radius: 3px;
position: absolute;
margin-top: 4px;
`;

const HomeCard: React.FC<HomeCardProps> = ({body, onCTAPress, header}) => {
export const HOME_CARD_HEIGHT = 143;
export const HOME_CARD_WIDTH = 170;

const HomeCard: React.FC<HomeCardProps> = ({body, footer, onCTAPress}) => {
const {t} = useTranslation();
const HeaderComp = <CardHeader>{header}</CardHeader>;
const theme = useTheme();
const {
title,
Expand All @@ -137,10 +113,7 @@ const HomeCard: React.FC<HomeCardProps> = ({body, onCTAPress, header}) => {
<>
{value && <CardPrice scale={shouldScale(value)}>{value}</CardPrice>}
{percentageDifference ? (
<Percentage
percentageDifference={percentageDifference}
darkModeColor={Slate}
/>
<Percentage percentageDifference={percentageDifference} />
) : null}
{pillText && (
<CardPill>
Expand All @@ -162,22 +135,21 @@ const HomeCard: React.FC<HomeCardProps> = ({body, onCTAPress, header}) => {
}
};

const FooterComp = (
<FooterArrow activeOpacity={ActiveOpacity} onPress={_onPress}>
<Arrow isDark={theme.dark} />
</FooterArrow>
);
const DefaultFooter = <ArrowRightSvg />;

const FooterComp = footer ?? DefaultFooter;

return (
<CardContainer activeOpacity={ActiveOpacity} onPress={_onPress}>
<Card
header={HeaderComp}
body={BodyComp}
footer={FooterComp}
style={{
backgroundColor: theme.dark ? LightBlack : White,
height: 200,
width: 170,
backgroundColor: theme.dark ? '#111' : White,
borderColor: theme.dark ? LightBlack : Slate30,
borderWidth: 1,
height: HOME_CARD_HEIGHT,
width: HOME_CARD_WIDTH,
}}
/>
</CardContainer>
Expand Down
47 changes: 47 additions & 0 deletions src/components/icons/trend-arrow/DecrementArrow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from 'react';
import {useTheme} from 'styled-components/native';
import Svg, {Rect, Path} from 'react-native-svg';
import type {SvgProps} from 'react-native-svg';
import {White} from '../../../styles/colors';

export interface TrendArrowProps extends SvgProps {
backgroundColor?: string;
arrowColor?: string;
}

const DecrementArrow: React.FC<TrendArrowProps> = ({
backgroundColor,
arrowColor,
width = 20,
height = 20,
...rest
}) => {
const theme = useTheme();
const defaultBackground =
backgroundColor ?? (theme.dark ? '#DA3636' : '#FF647C');
const defaultArrowColor = arrowColor ?? White;

return (
<Svg
width={width}
height={height}
viewBox="0 0 20 20"
fill="none"
{...rest}>
<Rect
width="20"
height="20"
rx="6"
transform="matrix(1 0 0 -1 0 20)"
fill={defaultBackground}
/>
<Path
d="M1.70379 0.132585L1.67609 1.34232L5.3917 1.25723L7.2415e-06 6.64892L0.844314 7.49322L6.236 2.10153L6.15091 5.81714L7.36065 5.78944L7.49323 3.02961e-06L1.70379 0.132585Z"
fill={defaultArrowColor}
transform="matrix(1 0 0 -1 6 14)"
/>
</Svg>
);
};

export default DecrementArrow;
Loading