From 580cb409040b876e4d45f85b5eab42e2103f74c3 Mon Sep 17 00:00:00 2001 From: quangnt Date: Thu, 14 Dec 2023 10:23:26 +0700 Subject: [PATCH] fix: click link info on proposal detail --- .../DetailsCard/DetailsCard.js | 12 +++++----- .../DetailsCard/DetailsCard.module.scss | 23 +++++++++---------- src/icons/CopyIcon.js | 13 +++++++++-- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/components/ProposalDetails/DetailsCard/DetailsCard.js b/src/components/ProposalDetails/DetailsCard/DetailsCard.js index fc118aee..817cb8ac 100644 --- a/src/components/ProposalDetails/DetailsCard/DetailsCard.js +++ b/src/components/ProposalDetails/DetailsCard/DetailsCard.js @@ -225,8 +225,10 @@ const DetailsCard = memo(({ data }) => {
Infor
-
+ {data?.plan?.info?.length > 15 ? data?.plan?.info?.substring(0, 15) + "...." : data?.plan?.info || "-"} + + { copy(data?.plan?.info); dispatch( @@ -236,10 +238,8 @@ const DetailsCard = memo(({ data }) => { autoHideDuration: 1500, }) ); - }}> - {data?.plan?.info?.length > 15 ? data?.plan?.info?.substring(0, 15) + "...." : data?.plan?.info || "-"} - -
+ }} + className={cx("copy-icon")}> diff --git a/src/components/ProposalDetails/DetailsCard/DetailsCard.module.scss b/src/components/ProposalDetails/DetailsCard/DetailsCard.module.scss index 35f395e5..d10bc066 100644 --- a/src/components/ProposalDetails/DetailsCard/DetailsCard.module.scss +++ b/src/components/ProposalDetails/DetailsCard/DetailsCard.module.scss @@ -55,7 +55,7 @@ .tx-hash-data-cell { color: var(--common-linkColor); - font-family: 'IBM Plex Sans'; + font-family: "IBM Plex Sans"; font-style: normal; font-weight: normal; font-size: 14px; @@ -171,7 +171,7 @@ .item-new-admin { color: var(--common-textColor); } - + .item-text { color: var(--common-textColor); font-family: "IBM Plex Sans"; @@ -193,14 +193,15 @@ @media screen and (min-width: 1280px) { max-width: 80%; } - .copy-icon { - margin-left: 15px; - display: inline-flex; - flex-direction: row; - justify-content: center; - align-items: center; - cursor: pointer; - } + } + + .copy-icon { + margin-left: 15px; + display: inline-flex; + flex-direction: row; + justify-content: center; + align-items: center; + cursor: pointer; } .amount { @@ -279,5 +280,3 @@ .skeleton { display: inline-block; } - - diff --git a/src/icons/CopyIcon.js b/src/icons/CopyIcon.js index 4893f218..99ed8e50 100644 --- a/src/icons/CopyIcon.js +++ b/src/icons/CopyIcon.js @@ -1,9 +1,18 @@ import React from "react"; import PropTypes from "prop-types"; -const CopyIcon = ({ className, width = '16', height = '18' }) => { +const CopyIcon = ({ onClick, className, width = "16", height = "18" }) => { return ( - + { + onClick && onClick(); + }} + className={className} + width={width} + height={height} + viewBox='0 0 16 18' + fill='none' + xmlns='http://www.w3.org/2000/svg'>