Skip to content

Commit 0cd61fc

Browse files
Merge pull request #4117 from OneCommunityGlobal/Diya_Fix_CCList_Button
Diya fix(usp): added counter on ccList button for BS
2 parents 0ec02e2 + 51d0b58 commit 0cd61fc

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

src/components/UserProfile/UserProfileModal/UserProfileModal.jsx

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,36 @@ const handleCcListUpdate = (newCount) => {
421421

422422
<ModalFooter className={darkMode ? 'bg-yinmn-blue' : ''}>
423423
<div className="d-flex w-100 align-items-center">
424-
<Button
425-
color="secondary"
426-
onClick={openCc}
427-
style={boxStyling}
428-
className="mr-2"
429-
>
430-
CC List({ccCount})
431-
</Button>
432-
<div className="ml-auto d-flex align-items-center" style={{ gap: '0.5rem', flexWrap: 'wrap' }}>
424+
<div style={{ position: 'relative', display: 'inline-block' }}>
425+
<Button
426+
color="secondary"
427+
onClick={openCc}
428+
style={boxStyling}
429+
className="mr-2"
430+
>
431+
CC List
432+
</Button>
433+
{ccCount > 0 && (
434+
<span
435+
style={{
436+
position: 'absolute',
437+
top: '-10px',
438+
right: '-3px',
439+
backgroundColor: '#28a745', // green
440+
color: 'white',
441+
borderRadius: '50%',
442+
padding: '2px 6px',
443+
fontSize: '12px',
444+
fontWeight: 'bold',
445+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.2)',
446+
}}
447+
>
448+
{ccCount}
449+
</span>
450+
)}
451+
</div>
452+
453+
<div className="ml-auto d-flex align-items-center" style={{ gap: '0.5rem', flexWrap: 'wrap' }}>
433454
{type === 'addBlueSquare' && (
434455
<Button
435456
color="danger"

0 commit comments

Comments
 (0)