@@ -19,7 +19,10 @@ const prefixEmbedded = 'overview.appInfo.embedded'
1919
2020const CopyFeedback = ( { content } : Props ) => {
2121 const { t } = useTranslation ( )
22- const { copied, copy, reset } = useClipboard ( )
22+ // Rely on useClipboard's own timer to flip `copied` back to false so the
23+ // "Copied" tooltip stays visible long enough to be read, matching the
24+ // KeyValueItem pattern. Do NOT reset on mouse leave.
25+ const { copied, copy } = useClipboard ( { timeout : 2000 } )
2326
2427 const tooltipText = copied
2528 ? t ( `${ prefixEmbedded } .copied` , { ns : 'appOverview' } )
@@ -36,10 +39,7 @@ const CopyFeedback = ({ content }: Props) => {
3639 popupContent = { safeText }
3740 >
3841 < ActionButton >
39- < div
40- onClick = { handleCopy }
41- onMouseLeave = { reset }
42- >
42+ < div onClick = { handleCopy } >
4343 { copied && < RiClipboardFill className = "h-4 w-4" /> }
4444 { ! copied && < RiClipboardLine className = "h-4 w-4" /> }
4545 </ div >
@@ -52,7 +52,7 @@ export default CopyFeedback
5252
5353export const CopyFeedbackNew = ( { content, className } : Pick < Props , 'className' | 'content' > ) => {
5454 const { t } = useTranslation ( )
55- const { copied, copy, reset } = useClipboard ( )
55+ const { copied, copy } = useClipboard ( { timeout : 2000 } )
5656
5757 const tooltipText = copied
5858 ? t ( `${ prefixEmbedded } .copied` , { ns : 'appOverview' } )
@@ -73,7 +73,6 @@ export const CopyFeedbackNew = ({ content, className }: Pick<Props, 'className'
7373 >
7474 < div
7575 onClick = { handleCopy }
76- onMouseLeave = { reset }
7776 className = { `h-full w-full ${ copyStyle . copyIcon } ${ copied ? copyStyle . copied : '' } ` }
7877 >
7978 </ div >
0 commit comments