File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,12 @@ import {
1010const CopyButton = ( {
1111 textToCopy,
1212 displayText,
13+ buttonText,
1314 tooltipWithText = false ,
1415} : {
1516 textToCopy : string ;
1617 displayText ?: string ;
18+ buttonText ?: string ;
1719 tooltipWithText ?: boolean ;
1820} ) => {
1921 const [ showTooltip , setShowTooltip ] = useState ( false ) ;
@@ -58,8 +60,9 @@ const CopyButton = ({
5860 } }
5961 onMouseEnter = { handleMouseEnter }
6062 onMouseLeave = { handleMouseLeave }
61- className = "hover:before:bg-muted active:before:bg-secondary relative z-0 -mx-1 -my-1 items-center gap-1 px-1 py-1 transition-colors before:absolute before:inset-0 before:-z-10 before:rounded-lg before:duration-200 active:before:scale-x-[0.98] active:before:scale-y-[0.94]"
63+ className = "hover:before:bg-muted active:before:bg-secondary relative z-0 -mx-1 -my-1 flex items-center gap-1 px-1 py-1 transition-colors before:absolute before:inset-0 before:-z-10 before:rounded-lg before:duration-200 active:before:scale-x-[0.98] active:before:scale-y-[0.94]"
6264 >
65+ { buttonText && < span className = "mr-1 text-sm" > { buttonText } </ span > }
6366 < Copy className = "size-4 flex-none" />
6467 </ button >
6568 </ span >
You can’t perform that action at this time.
0 commit comments