From f5282721b56592fbdd826ae2faa59c79dd9dc975 Mon Sep 17 00:00:00 2001 From: chloe <44501120+chloezxyy@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:16:13 +0800 Subject: [PATCH] feat(ui-ux): hover ux on card --- .../locales/en-US/page-explore-wallets.json | 3 +- src/components/commons/Buttons.tsx | 9 +- .../_components/DownloadAssetsCard.tsx | 82 ++++++------ .../_components/VisualAssetsSection.tsx | 123 ++++++++++-------- 4 files changed, 123 insertions(+), 94 deletions(-) diff --git a/public/locales/en-US/page-explore-wallets.json b/public/locales/en-US/page-explore-wallets.json index 9ccaa8f00..2a6c9935f 100644 --- a/public/locales/en-US/page-explore-wallets.json +++ b/public/locales/en-US/page-explore-wallets.json @@ -55,7 +55,8 @@ "title": "DFI 3D Coin", "desc": "3D asset for illustration purposes" } - } + }, + "button": "Download .zipped files" }, "advanceUseSection": { "sectionTitle": "SUITABLE FOR ADVANCE USAGE", diff --git a/src/components/commons/Buttons.tsx b/src/components/commons/Buttons.tsx index a490aa9da..741375464 100644 --- a/src/components/commons/Buttons.tsx +++ b/src/components/commons/Buttons.tsx @@ -88,6 +88,8 @@ export function SecondaryButton({ customSize, customClass, testID, + hasIcon = true, + download = false, }: { text: string; className?: string; @@ -97,6 +99,8 @@ export function SecondaryButton({ customClass?: string; customSize?: number; testID: string; + hasIcon: boolean; + download?: boolean; }) { const size = customSize ?? 20; const customClassName = customClass ?? "ml-[15px]"; @@ -107,6 +111,7 @@ export function SecondaryButton({ href={href} className={classNames("block w-fit", { "pointer-events-none": disabled })} data-testid={`secondary-button-${testID}`} + download={download} > ); diff --git a/src/pages/explore/wallets/_components/DownloadAssetsCard.tsx b/src/pages/explore/wallets/_components/DownloadAssetsCard.tsx index 79457aa0e..c8d0027d4 100644 --- a/src/pages/explore/wallets/_components/DownloadAssetsCard.tsx +++ b/src/pages/explore/wallets/_components/DownloadAssetsCard.tsx @@ -24,49 +24,51 @@ export function DownloadAssetsCard( children, } = props; return ( -