11import { motion } from 'framer-motion'
2- import NextLink from 'next/link'
32import { memo } from 'react'
43
5- import { ExperimentalCopyButton , Skeleton } from '@edgeandnode/gds'
4+ import { ButtonOrLink , ExperimentalCopyButton , Skeleton } from '@edgeandnode/gds'
65import { Check } from '@edgeandnode/gds/icons'
76import { NetworkIcon } from '@edgeandnode/go'
87
@@ -24,7 +23,7 @@ interface NetworkRowProps {
2423export const NetworkRow = memo ( ( { network, locale } : NetworkRowProps ) => {
2524 return (
2625 < motion . tr
27- className = "group h-16 cursor-pointer transition-colors hover :bg-space-1600"
26+ className = "group/table-row isolate -outline-offset-1 transition hocus-visible-within :bg-space-1600 has-[a:focus-visible]:outline-focus "
2827 initial = { { opacity : 0 , y : 16 } }
2928 animate = { { opacity : 1 , y : 0 } }
3029 exit = { {
@@ -41,33 +40,24 @@ export const NetworkRow = memo(({ network, locale }: NetworkRowProps) => {
4140 } }
4241 layoutId = { network . id }
4342 >
44- < td className = "static min-w-48" >
45- < NextLink
46- href = { `/${ locale } /supported-networks/${ network . id } ` }
47- className = "absolute inset-0 z-10 flex size-full items-center px-3.5 py-2.5 -outline-offset-2"
48- >
49- < div className = "flex items-center gap-2" >
43+ < td >
44+ < ButtonOrLink href = { `/${ locale } /supported-networks/${ network . id } ` } className = "static outline-none" >
45+ < span className = "flex items-center gap-2" >
5046 { shouldShowSkeleton ( network . id ) ? (
5147 < Skeleton borderRadius = "FULL" height = "20px" width = "20px" />
5248 ) : (
5349 < NetworkIcon variant = { getIconVariant ( network . id ) } caip2Id = { network . caip2Id as any } size = { 5 } />
5450 ) }
55- < span className = "text-p14" > { network . shortName } </ span >
56- </ div >
57- </ NextLink >
51+ < span className = "text-body-xsmall" > { network . shortName } </ span >
52+ </ span >
53+ < span className = "absolute inset-y-0 start-0 z-10 w-[1999px]" />
54+ </ ButtonOrLink >
5855 </ td >
59- < td className = "w-48" >
60- < div className = "flex w-full items-center justify-between gap-2" >
61- < span className = "text-p14 !mb-0" > { network . id } </ span >
62- < div className = "z-20 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100" >
63- < div
64- onClick = { ( e ) => {
65- e . preventDefault ( )
66- e . stopPropagation ( )
67- } }
68- >
69- < ExperimentalCopyButton size = "small" variant = "tertiary" value = { network . id } />
70- </ div >
56+ < td >
57+ < div className = "flex items-center justify-between gap-2" >
58+ < span className = "text-body-xsmall" > { network . id } </ span >
59+ < div className = "z-20 shrink-0 opacity-0 transition group-focus-within/table-row:opacity-100 group-hover/table-row:opacity-100" >
60+ < ExperimentalCopyButton size = "small" variant = "tertiary" value = { network . id } />
7161 </ div >
7262 </ div >
7363 </ td >
0 commit comments