From 57c52b705c35b478661da2f6817ce23682e99608 Mon Sep 17 00:00:00 2001 From: Danny Delott Date: Thu, 12 Sep 2024 17:33:40 -0700 Subject: [PATCH] Animate hover on pool row --- .../src/ui/app/Navbar/Navbar.tsx | 16 ++++++------ .../src/ui/base/components/Well/Well.tsx | 25 +++++++++++++++++-- .../ui/markets/PoolDetails/PoolDetails.tsx | 2 +- apps/hyperdrive-trading/tailwind.config.js | 12 +++++++++ 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/apps/hyperdrive-trading/src/ui/app/Navbar/Navbar.tsx b/apps/hyperdrive-trading/src/ui/app/Navbar/Navbar.tsx index ecf2063b2..7600c883f 100644 --- a/apps/hyperdrive-trading/src/ui/app/Navbar/Navbar.tsx +++ b/apps/hyperdrive-trading/src/ui/app/Navbar/Navbar.tsx @@ -36,24 +36,24 @@ export function Navbar(): ReactElement { All Pools - + - Bridge + Portfolio - + - Portfolio + Bridge diff --git a/apps/hyperdrive-trading/src/ui/base/components/Well/Well.tsx b/apps/hyperdrive-trading/src/ui/base/components/Well/Well.tsx index 766be955f..38c96624f 100644 --- a/apps/hyperdrive-trading/src/ui/base/components/Well/Well.tsx +++ b/apps/hyperdrive-trading/src/ui/base/components/Well/Well.tsx @@ -45,12 +45,33 @@ export function Well({ "shadow-md": elevation === "elevated", "bg-gray-800": !transparent, "w-full": block, - "hover:-translate-y-0.5 hover:scale-[1.01] transition duration-300 hover:shadow-xl ease-in-out hover:shadow-primary/5": - isInteractive, "hover:cursor-pointer": onClick, }, ); + if (isInteractive) { + return ( + +
+
+ {children} +
+
+ ); + } + return ( - Back to home + Back to All Pools

diff --git a/apps/hyperdrive-trading/tailwind.config.js b/apps/hyperdrive-trading/tailwind.config.js index 056006211..8265f3dc2 100644 --- a/apps/hyperdrive-trading/tailwind.config.js +++ b/apps/hyperdrive-trading/tailwind.config.js @@ -2,6 +2,18 @@ module.exports = { content: ["./src/**/*.{js,ts,jsx,tsx,css}", "index.html"], theme: { + extend: { + animation: { + rotate: "rotate 1s linear 1 forwards", + }, + keyframes: { + rotate: { + "0%": { transform: "rotate(0deg) scale(10)", opacity: 0 }, + "50%": { transform: "rotate(-180deg) scale(10)", opacity: 0.25 }, + "100%": { transform: "rotate(-360deg) scale(10)", opacity: 0 }, + }, + }, + }, colors: { aquamarine: { 100: "#E8FFF7",