File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
apps/developer-hub/src/components/CopyAddress Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1+ @use " @pythnetwork/component-library/theme" ;
2+
3+ .address {
4+ display : flex ;
5+ flex-flow : row nowrap ;
6+ gap : theme .spacing (2 );
7+ }
Original file line number Diff line number Diff line change 11"use client" ;
22
33import { CopyButton } from "@pythnetwork/component-library/CopyButton" ;
4+ import { Link } from "@pythnetwork/component-library/Link" ;
45
56import TruncateToMiddle from "../TruncateToMiddle" ;
7+ import styles from "./index.module.scss" ;
68
79const CopyAddress = ( { address, url } : { address : string ; url ?: string } ) => {
810 return url ? (
9- < form >
10- < CopyButton text = { address } formAction = { url } type = "submit ">
11+ < div className = { styles . address } >
12+ < Link href = { url } target = "_blank" rel = "noreferrer ">
1113 < TruncateToMiddle text = { address } />
12- </ CopyButton >
13- </ form >
14+ </ Link >
15+ < CopyButton text = { address } iconOnly />
16+ </ div >
1417 ) : (
1518 < CopyButton text = { address } >
1619 < TruncateToMiddle text = { address } />
You can’t perform that action at this time.
0 commit comments