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 1
1
"use client" ;
2
2
3
3
import { CopyButton } from "@pythnetwork/component-library/CopyButton" ;
4
+ import { Link } from "@pythnetwork/component-library/Link" ;
4
5
5
6
import TruncateToMiddle from "../TruncateToMiddle" ;
7
+ import styles from "./index.module.scss" ;
6
8
7
9
const CopyAddress = ( { address, url } : { address : string ; url ?: string } ) => {
8
10
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 ">
11
13
< TruncateToMiddle text = { address } />
12
- </ CopyButton >
13
- </ form >
14
+ </ Link >
15
+ < CopyButton text = { address } iconOnly />
16
+ </ div >
14
17
) : (
15
18
< CopyButton text = { address } >
16
19
< TruncateToMiddle text = { address } />
You can’t perform that action at this time.
0 commit comments