Skip to content

Commit

Permalink
fixed the edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
KaleemNeslit committed Oct 8, 2024
1 parent 9eb1f04 commit 67ab6e2
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ type CustomSingleValueProps = {
showIcon?: boolean;
};

interface OptionProps {
type OptionProps = {
value: string;
label: string;
}
};

export const CWSingleSelectItem = (
props: SingleValueProps<OptionProps> & CustomSingleValueProps,
Expand All @@ -28,14 +28,18 @@ export const CWSingleSelectItem = (

return (
<div className="custom-single-value">
<div className="inner-container">
<CWIcon
className="check-icon"
iconSize="small"
iconName="checkCircleFilled"
/>
{formatAddressShort(data.label, 6)}
</div>
{extraProp && (
<div className="inner-container">
<CWIcon
className="check-icon"
iconSize="small"
iconName="checkCircleFilled"
/>
{formatAddressShort(data.label, 6)}
</div>
)}
{!extraProp && <span>{data.label}</span>}

{extraProp && <CopySimple size={20} onMouseDown={handleClickToCopy} />}
</div>
);
Expand Down

0 comments on commit 67ab6e2

Please sign in to comment.