From 21aed772e7714e47a6778449df675517e15ffe30 Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu Date: Tue, 21 Oct 2025 17:16:14 +0300 Subject: [PATCH 01/11] Refactored unlock panel footer --- .../unlock-panel-footer.scss | 41 +++--------- .../unlock-panel-footer.tsx | 65 +++++++++---------- src/global/tailwind.css | 1 + 3 files changed, 40 insertions(+), 67 deletions(-) diff --git a/src/components/functional/unlock-panel/components/unlock-panel-footer/unlock-panel-footer.scss b/src/components/functional/unlock-panel/components/unlock-panel-footer/unlock-panel-footer.scss index d2fee893..e9b55248 100644 --- a/src/components/functional/unlock-panel/components/unlock-panel-footer/unlock-panel-footer.scss +++ b/src/components/functional/unlock-panel/components/unlock-panel-footer/unlock-panel-footer.scss @@ -1,60 +1,37 @@ .unlock-panel-footer { @apply mvx:mt-auto mvx:flex mvx:cursor-pointer mvx:relative mvx:p-6 mvx:z-1 mvx:rounded-2xl mvx:overflow-hidden; - border: 1px solid var(--mvx-border-color-primary); - background: var(--mvx-bg-accent-color); - box-shadow: 0px -8px 12px 12px var(--mvx-bg-color-primary); + @apply mvx:border mvx:border-outline mvx:bg-emphasize mvx:shadow-[0px_-8px_12px_12px_surface]; &:hover .unlock-panel-footer-wrapper { @apply mvx:opacity-75; } .unlock-panel-footer-image { - @apply mvx:pointer-events-none mvx:-mt-8 mvx:mr-12 mvx:-mb-8 mvx:-ml-20 mvx:hidden mvx:max-h-48; + @apply mvx:pointer-events-none mvx:-mt-8 mvx:mr-12 mvx:-mb-8 mvx:-ml-20 mvx:hidden mvx:max-h-48 mvx:xs:flex; - @media (min-width: 480px) { - @apply mvx:flex; - } } .unlock-panel-footer-wrapper { - @apply mvx:flex mvx:flex-col mvx:transition-all mvx:duration-200 mvx:gap-2 mvx:flex-1 mvx:ease-in-out; - - @media (min-width: 480px) { - @apply mvx:gap-4; - } + @apply mvx:flex mvx:flex-col mvx:transition-all mvx:duration-200 mvx:gap-2 mvx:flex-1 mvx:ease-in-out mvx:xs:gap-4; .unlock-panel-footer-title { - @apply mvx:font-medium mvx:leading-none mvx:text-base; - color: var(--mvx-text-color-primary); - - @media (min-width: 480px) { - @apply mvx:pt-4 mvx:text-xl; - } + @apply mvx:font-medium mvx:leading-none mvx:text-base mvx:text-primary mvx:xs:pt-4 mvx:xs:text-xl; } .unlock-panel-footer-subtitle { - @apply mvx:text-base mvx:leading-tight mvx:opacity-40; - color: var(--mvx-text-color-primary); + @apply mvx:text-base mvx:leading-tight mvx:opacity-40 mvx:text-primary; &.desktop { - @apply mvx:hidden; - - @media (min-width: 480px) { - @apply mvx:flex; - } + @apply mvx:hidden mvx:xs:flex; } &.mobile { - @apply mvx:text-xs; - - @media (min-width: 480px) { - @apply mvx:hidden; - } + @apply mvx:text-xs mvx:xs:hidden; } .unlock-panel-footer-subtitle-link { - color: var(--mvx-text-accent-color); + @apply mvx:text-accent; } } } -} +} \ No newline at end of file diff --git a/src/components/functional/unlock-panel/components/unlock-panel-footer/unlock-panel-footer.tsx b/src/components/functional/unlock-panel/components/unlock-panel-footer/unlock-panel-footer.tsx index 566f9a74..4af53acf 100644 --- a/src/components/functional/unlock-panel/components/unlock-panel-footer/unlock-panel-footer.tsx +++ b/src/components/functional/unlock-panel/components/unlock-panel-footer/unlock-panel-footer.tsx @@ -1,4 +1,4 @@ -import { Component, h, Prop } from '@stencil/core'; +import { h } from '@stencil/core'; import { Icon } from 'common/Icon'; import unlockPanelWalletImg from '../../../../../assets/unlock-panel-wallet.webp'; @@ -8,50 +8,45 @@ const styles = { unlockButton: 'unlock-panel-footer-icon mvx:text-primary mvx:w-4 mvx:h-auto mvx:hidden mvx:xs:flex mvx:ml-auto mvx:mt-auto', } satisfies Record; -@Component({ - tag: 'mvx-unlock-panel-footer', - styleUrl: 'unlock-panel-footer.scss', - shadow: true, -}) -export class UnlockPanel { - @Prop() walletAddress: string; +export function UnlockPanelFooter({ walletAddress }: { walletAddress: string }) { - handleWalletClick = (event: MouseEvent) => { + + const handleWalletClick = (event: MouseEvent) => { event.preventDefault(); event.stopPropagation(); - window.open(this.walletAddress, '_blank'); + window.open(walletAddress, '_blank'); }; - render() { - const processedWalletAddress = String(this.walletAddress).replace('https://', ''); - - return ( -