diff --git a/src/components/CCIP/ChainHero/ChainHero.css b/src/components/CCIP/ChainHero/ChainHero.css index 34c38f7ae17..7d7ce722c95 100644 --- a/src/components/CCIP/ChainHero/ChainHero.css +++ b/src/components/CCIP/ChainHero/ChainHero.css @@ -1,5 +1,5 @@ .ccip-chain-hero { - background-color: var(--gray-100); + background: var(--Page-Background-Alt); border-bottom: 1px solid var(--gray-200); min-height: 241px; } diff --git a/src/components/CCIP/ChainHero/LaneDetailsHero.css b/src/components/CCIP/ChainHero/LaneDetailsHero.css index 706ee384876..4bfbe4134b2 100644 --- a/src/components/CCIP/ChainHero/LaneDetailsHero.css +++ b/src/components/CCIP/ChainHero/LaneDetailsHero.css @@ -1,5 +1,5 @@ .lane-details-hero { - background-color: var(--gray-100); + background: var(--Page-Background-Alt); padding: var(--space-6x); border-bottom: 1px solid var(--gray-200); } @@ -42,9 +42,16 @@ } .lane-details-hero__details { - display: grid; - grid-template-columns: 1fr 1fr; - gap: var(--space-6x); + display: flex; + flex-wrap: wrap; + gap: var(--space-10x); +} + +.lane-details-hero__details__item { + display: flex; + flex-direction: column; + gap: var(--space-4x); + min-width: var(--space-45x); } .lane-details-hero__details__label { @@ -61,10 +68,6 @@ padding: var(--space-6x) var(--space-10x) var(--space-10x); } - .lane-details-hero__details { - grid-template-columns: 1fr 2fr; - } - .lane-details-hero__networks { flex-direction: row; align-items: center; diff --git a/src/components/CCIP/ChainHero/LaneDetailsHero.tsx b/src/components/CCIP/ChainHero/LaneDetailsHero.tsx index 8c96ef2fde5..e92763ee216 100644 --- a/src/components/CCIP/ChainHero/LaneDetailsHero.tsx +++ b/src/components/CCIP/ChainHero/LaneDetailsHero.tsx @@ -19,8 +19,8 @@ interface LaneDetailsHeroProps { } onRamp: string offRamp: string + sourceAddress: string destinationAddress: string - enforceOutOfOrder?: boolean explorer: ExplorerInfo inOutbound: LaneFilter } @@ -69,13 +69,13 @@ const DetailItem = ({ clipboardType?: string tooltip?: React.ReactNode }) => ( - <> +
{label} {tooltip}
{children}
- +
) function LaneDetailsHero({ @@ -83,17 +83,11 @@ function LaneDetailsHero({ destinationNetwork, onRamp, offRamp, + sourceAddress, destinationAddress, - enforceOutOfOrder, explorer, inOutbound, }: LaneDetailsHeroProps) { - // Map boolean values to display strings - const getOutOfOrderText = (value?: boolean) => { - if (value === true) return "Required" - if (value === false) return "Optional" - return "N/A" - } return (
@@ -115,44 +109,41 @@ function LaneDetailsHero({
- {/* Display address information based on lane type */} - {inOutbound === LaneFilter.Inbound ? ( - - - - ) : ( - : undefined} - > - - - )} + : undefined} + > + + - - {destinationAddress ? : "n/a"}{" "} + + - {inOutbound === LaneFilter.Outbound && ( - - } - > - {getOutOfOrderText(enforceOutOfOrder)} - - )} + } + > + {sourceAddress ? : "n/a"} + + + } + > + {destinationAddress ? : "n/a"} +
) diff --git a/src/components/CCIP/Drawer/Drawer.css b/src/components/CCIP/Drawer/Drawer.css index f42721fad1d..0b8d48a4d6a 100644 --- a/src/components/CCIP/Drawer/Drawer.css +++ b/src/components/CCIP/Drawer/Drawer.css @@ -52,6 +52,11 @@ width: 75%; } + /* Wide drawer for lane details - full width minus ESC button width and spacing */ + .drawer__container--wide { + width: calc(100% - var(--space-12x) - var(--space-8x)); + } + .drawer__closeMobile { display: none; } diff --git a/src/components/CCIP/Drawer/Drawer.tsx b/src/components/CCIP/Drawer/Drawer.tsx index 9120bb98b0f..7846947b9dc 100644 --- a/src/components/CCIP/Drawer/Drawer.tsx +++ b/src/components/CCIP/Drawer/Drawer.tsx @@ -1,6 +1,6 @@ import { useStore } from "@nanostores/react" import "./Drawer.css" -import { drawerContentStore } from "./drawerStore.ts" +import { drawerContentStore, drawerWidthStore, DrawerWidth } from "./drawerStore.ts" import { useRef, useEffect, useState } from "react" import { clsx } from "~/lib/clsx/clsx.ts" import type { ReactNode } from "react" @@ -9,6 +9,7 @@ function Drawer() { const drawerRef = useRef(null) const drawerContentRef = useRef(null) const $drawerContent = useStore(drawerContentStore) as (() => ReactNode) | ReactNode | null + const $drawerWidth = useStore(drawerWidthStore) const [isOpened, setIsOpened] = useState(false) // exit when press esc @@ -47,6 +48,7 @@ function Drawer() { // Use transitionend event instead of setTimeout for better performance const handleTransitionEnd = () => { drawerContentStore.set(null) + drawerWidthStore.set(DrawerWidth.Default) drawerRef.current?.removeEventListener("transitionend", handleTransitionEnd) } @@ -62,7 +64,12 @@ function Drawer() { ref={drawerRef} onClick={handleClickOutside} > -
+