diff --git a/src/components/appBox.tsx b/src/components/appBox.tsx index b28ff12..3904c5b 100644 --- a/src/components/appBox.tsx +++ b/src/components/appBox.tsx @@ -377,7 +377,7 @@ export default function AppBox() {

Sender

@@ -405,7 +405,7 @@ export default function AppBox() {

Recipient

@@ -420,7 +420,7 @@ export default function AppBox() { /> -
+

Amount

diff --git a/src/components/pendingModal.tsx b/src/components/pendingModal.tsx index b324515..2aab8fd 100644 --- a/src/components/pendingModal.tsx +++ b/src/components/pendingModal.tsx @@ -1,14 +1,29 @@ +import { useTrail, animated } from "@react-spring/web"; import Image from "next/image"; export default function PendingModal({ visible }: { visible: boolean }) { + const trails = useTrail(2, { + from: { transform: "translateX(-100%)", opacity: 0 }, + to: { opacity: visible ? 1 : 0, transform: visible ? "translateX(0)" : "translateX(-100%)" }, + }); return ( <> {visible && (
- Darwinia Paralink -

Transaction is being Processed

+ + Darwinia Paralink + + + Transaction is being Processed +
diff --git a/src/components/successModal.tsx b/src/components/successModal.tsx index 3f039f1..f77c0ae 100644 --- a/src/components/successModal.tsx +++ b/src/components/successModal.tsx @@ -1,23 +1,31 @@ import { useTransfer } from "@/hooks"; import { formatBalance } from "@/utils"; import Image from "next/image"; +import { useTrail, animated } from "@react-spring/web"; export default function SuccessModal({ visible, onClose }: { visible: boolean; onClose: () => void }) { const { sourceAsset, transferAmount } = useTransfer(); + + const trails = useTrail(3, { + from: { transform: "translateX(-100%)", opacity: 0 }, + to: { opacity: visible ? 1 : 0, transform: visible ? "translateX(0)" : "translateX(-100%)" }, + }); return ( <> {visible && (
- Darwinia Paralink -
+ + Darwinia Paralink + +

Success !

You send {formatBalance(transferAmount.amount, sourceAsset.decimals)} {sourceAsset.name}

-
-
+ + -
+
diff --git a/tailwind.config.ts b/tailwind.config.ts index 1b93872..c6c9529 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -58,6 +58,17 @@ const config: Config = { height: "16px", }, }, + bouncing: { + "0%": { + transform: "scale(1)", + }, + "50%": { + transform: "scale(1.2)", + }, + "100%": { + transform: "scale(1)", + }, + }, }, animation: { "notification-enter": "rightenter 400ms ease-out", @@ -65,6 +76,7 @@ const config: Config = { "notification-fadeout": "notificationfadeout 200ms ease-out forwards", "count-loading-small": "countloadingsmall 1200ms cubic-bezier(0, 0.5, 0.5, 1) infinite", "count-loading-large": "countloadinglarge 1200ms cubic-bezier(0, 0.5, 0.5, 1) infinite", + "pending-bounce": "bouncing 1.5s ease-in-out infinite", }, }, },