From 7597d7233d3481c9b85b3ef147d6eedeb9eb794e Mon Sep 17 00:00:00 2001 From: robhyrk Date: Wed, 15 Nov 2023 01:12:06 -0500 Subject: [PATCH] style: mobile styles --- components/ui/TabGroup.tsx | 6 +-- pages/deposit.tsx | 99 ++++++++++++++++++++------------------ 2 files changed, 56 insertions(+), 49 deletions(-) diff --git a/components/ui/TabGroup.tsx b/components/ui/TabGroup.tsx index e9fc24a79..695cb7b55 100644 --- a/components/ui/TabGroup.tsx +++ b/components/ui/TabGroup.tsx @@ -56,12 +56,12 @@ const TabGroup = ({ (selectedIndex === id ? selectedItemClassName : isDisabled - ? disabledItemClassName - : "cursor-pointer") + ? disabledItemClassName + : "cursor-pointer") } > {Icon && ( -
+
)} diff --git a/pages/deposit.tsx b/pages/deposit.tsx index ea0e349f7..f61988289 100644 --- a/pages/deposit.tsx +++ b/pages/deposit.tsx @@ -86,7 +86,7 @@ const UsdtIcon = (props: SVGProps) => ( ); const DepositMethodItems = ["buy", "deposit"] as const; -type DepositMethod = typeof DepositMethodItems[number]; +type DepositMethod = (typeof DepositMethodItems)[number]; const DepositMethodLabels: Record = { buy: "Buy", @@ -95,12 +95,15 @@ const DepositMethodLabels: Record = { const DepositCurrencyItems = ["ztg", "dot", "usdt"] as const; const ss58PrefixLookup = { ztg: 73, dot: 0, usdt: 0 }; -type DepositCurrency = typeof DepositCurrencyItems[number]; +type DepositCurrency = (typeof DepositCurrencyItems)[number]; const DepositCurrencyLabels: Record = - DepositCurrencyItems.reduce((acc, item) => { - return { ...acc, [item]: item.toUpperCase() }; - }, {} as Record); + DepositCurrencyItems.reduce( + (acc, item) => { + return { ...acc, [item]: item.toUpperCase() }; + }, + {} as Record, + ); const DepositCurrencyIcons: Record = { ztg: ZtgIcon, @@ -109,7 +112,7 @@ const DepositCurrencyIcons: Record = { }; const DepositPaymentMethodItems = ["card", "crypto"] as const; -type DepositPaymentMethod = typeof DepositPaymentMethodItems[number]; +type DepositPaymentMethod = (typeof DepositPaymentMethodItems)[number]; const DepositPaymentMethodLabels: Record = { card: "Use Credit Card", @@ -131,7 +134,7 @@ const ResultButtons = ({ href={item.url} target="_blank" className={ - "flex items-center justify-center gap-2 h-16 outline-none center rounded-lg cursor-pointer bg-white" + "center flex cursor-pointer items-center justify-center gap-2 rounded-lg bg-white p-3 leading-10 outline-none" } >
{item.label}
@@ -213,7 +216,7 @@ const DotDeposit = ({ address }: { address: string }) => { return (
transfer())}> -
+
{ }, })} className={ - "ml-auto w-[300px] text-right bg-white px-5 rounded-none h-10 " + + "ml-auto h-10 w-[300px] rounded-none bg-white px-5 text-right " + (errors.amount ? "border-vermilion" : "") } type="number" @@ -251,7 +254,7 @@ const DotDeposit = ({ address }: { address: string }) => { />
-
+
<>{errors["amount"]?.message} {!errors["amount"]?.message && remainingSourceBalance.lessThan(existentialDeposit ?? 0) && @@ -264,7 +267,7 @@ const DotDeposit = ({ address }: { address: string }) => { )}
@@ -304,7 +307,7 @@ const DepositPage: NextPage = () => { return ( <> -

Deposit Tokens

+

Deposit Tokens

You need some funds to make predictions on our platform. Select from @@ -316,8 +319,8 @@ const DepositPage: NextPage = () => { labels={DepositMethodLabels} selected={method} onChange={setMethod} - className="h-16" - itemClassName="center outline-none rounded-lg bg-white" + className="" + itemClassName="text-center center outline-none rounded-lg bg-white p-3 sm:leading-10" selectedItemClassName="!bg-ice-hush" /> { onChange={setCurrency} disabled={["usdt"]} className="h-36" - itemClassName="center outline-none rounded-lg bg-white" + itemClassName="flex flex-col sm:flex-row gap-3 items-center center outline-none rounded-lg bg-white" disabledItemClassName="!bg-misty-harbor text-sky-600" selectedItemClassName="!bg-ice-hush" /> @@ -340,36 +343,40 @@ const DepositPage: NextPage = () => { onChange={setPaymentMethod} disabled={disabledPaymentMethods} disabledItemClassName="!bg-misty-harbor text-sky-600" - className="h-16" - itemClassName="center outline-none rounded-lg bg-white" + className="" + itemClassName="text-center center outline-none rounded-lg bg-white p-3 leading-10" selectedItemClassName="!bg-ice-hush" /> )} - {method === "buy" && currency === "ztg" && paymentMethod === "crypto" && ( - - )} - {method === "buy" && currency === "dot" && paymentMethod === "crypto" && ( - - )} + {method === "buy" && + currency === "ztg" && + paymentMethod === "crypto" && ( + + )} + {method === "buy" && + currency === "dot" && + paymentMethod === "crypto" && ( + + )} {method === "buy" && currency === "dot" && paymentMethod === "card" && @@ -383,8 +390,8 @@ const DepositPage: NextPage = () => { }, ]} /> -

-
+
+
{ Fund your {currency.toUpperCase()} Wallet
-
+
@@ -475,7 +482,7 @@ const DepositPage: NextPage = () => {
*/}

Next Steps

-
+