Skip to content

Commit

Permalink
chore: omp remove copy icon (#1826)
Browse files Browse the repository at this point in the history
Co-authored-by: Gitanjli Chopra <[email protected]>
  • Loading branch information
gitanjli525 and Gitanjli Chopra authored Nov 29, 2024
1 parent b797a6a commit 0216973
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions src/screens/OMPSwitch/OMPSwitchHelper.res
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,32 @@ module ListBaseComp = {

let textColor = isDarkBg ? "text-grey-300" : "text-grey-900"
let width = isDarkBg ? "w-[12rem]" : "min-w-[5rem] w-fit max-w-[10rem]"
let padding = isDarkBg ? "pl-2" : ""
let paddingSubheading = isDarkBg ? "pl-2" : ""
let paddingHeading = isDarkBg ? "pl-2" : ""

let endValue = isDarkBg ? 22 : 8
let endValue = isDarkBg ? 23 : 15

let subHeadingElement = if subHeading->String.length > 8 {
let subHeadingElement = if subHeading->String.length > 15 {
<HSwitchOrderUtils.EllipsisText
displayValue=subHeading
endValue
showCopy=true
showCopy=false
customTextStyle={`${textColor} font-extrabold`}
/>
} else {
<HelperComponents.CopyTextCustomComp displayValue=subHeading customTextCss="text-nowrap" />
{subHeading->React.string}
}

<div className={`text-sm font-medium cursor-pointer ${baseCompStyle}`}>
<div className={`flex flex-col items-start`}>
<RenderIf condition={heading->LogicUtils.isNonEmptyString}>
<p className="text-xs text-left text-gray-400"> {heading->React.string} </p>
<p className={`text-xs text-left text-gray-400 ${paddingHeading}`}>
{heading->React.string}
</p>
</RenderIf>
<div className="text-left flex gap-2">
<p className={`fs-10 ${textColor} ${width} ${padding} overflow-scroll text-nowrap`}>
<p
className={`fs-10 ${textColor} ${width} ${paddingSubheading} overflow-scroll text-nowrap`}>
{subHeadingElement}
</p>
<RenderIf condition={showEditIcon}>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/OMPSwitch/OrgSwitch.res
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ let make = () => {
customSelectStyle="md:bg-blue-840 hover:bg-popover-background-hover rounded"
searchable=false
baseComponent={<ListBaseComp
heading=""
heading="Org"
subHeading={currentOMPName(orgList, orgId)}
arrow
showEditIcon={userHasAccess(~groupAccess=OrganizationManage) === Access}
Expand Down

0 comments on commit 0216973

Please sign in to comment.