From 2dbc858ce01d794d2641e5d78cf466ad906f33f0 Mon Sep 17 00:00:00 2001 From: Eka Date: Thu, 4 Jan 2024 18:10:52 +0400 Subject: [PATCH] CORE: oai width --- modules/notification/styles.module.css | 1 + templates/output/card-dropdown.jsx | 94 ++++++++++++----------- templates/output/card-dropdown.module.css | 7 ++ 3 files changed, 59 insertions(+), 43 deletions(-) diff --git a/modules/notification/styles.module.css b/modules/notification/styles.module.css index 4b401ca2..ebe6e4f5 100644 --- a/modules/notification/styles.module.css +++ b/modules/notification/styles.module.css @@ -6,4 +6,5 @@ color: var(--white); background-color: var(--gray-600); border-radius: 0.5rem; + width: max-content; } diff --git a/templates/output/card-dropdown.jsx b/templates/output/card-dropdown.jsx index 078c8102..9b12c17f 100644 --- a/templates/output/card-dropdown.jsx +++ b/templates/output/card-dropdown.jsx @@ -87,33 +87,37 @@ const CardDropdown = ({ ) const EllipsisText = (text) => - text?.length > 22 ? `${text.substring(0, 22)}...` : text + text?.length > 30 ? `${text.substring(0, 30)}...` : text const renderOAI = ( - oai - - {EllipsisText(oai)} - - {isTooltipVisible &&
{oai}
} - { - e.stopPropagation() - copyUrl() - }} - /> - {copyUrlStatus === 'copied' && } +
+ oai + + {EllipsisText(oai)} + + {isTooltipVisible &&
{oai}
} +
+
+ { + e.stopPropagation() + copyUrl() + }} + /> + {copyUrlStatus === 'copied' && } +
) @@ -148,25 +152,29 @@ const CardDropdown = ({ className={classNames.use(styles.identifier)} tag="span" > - oai - - {EllipsisText(oai)} - - - {copyUrlStatus === 'copied' && } +
+ oai + + {EllipsisText(oai)} + +
+
+ + {copyUrlStatus === 'copied' && } +
)} {(updatedDate || createdDate) && ( diff --git a/templates/output/card-dropdown.module.css b/templates/output/card-dropdown.module.css index 07da1d7a..00d009c4 100644 --- a/templates/output/card-dropdown.module.css +++ b/templates/output/card-dropdown.module.css @@ -10,9 +10,16 @@ position: relative; display: flex; align-items: center; + justify-content: space-between; color: var(--primary); } +.inner-identifier { + display: flex; + align-items: center; + justify-content: center; +} + .icon-copy { margin-left: 0.6rem; cursor: pointer;