File tree Expand file tree Collapse file tree
apps/web/src/components/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ import { cn } from "~/lib/utils";
77export const MessageCopyButton = memo ( function MessageCopyButton ( {
88 text,
99 title = "Copy message" ,
10- disabled = false ,
11- disabledTitle,
1210 size = "xs" ,
1311 variant = "outline" ,
1412 className,
@@ -17,8 +15,6 @@ export const MessageCopyButton = memo(function MessageCopyButton({
1715} : {
1816 text : string ;
1917 title ?: string ;
20- disabled ?: boolean ;
21- disabledTitle ?: string ;
2218 size ?: "xs" | "icon-xs" ;
2319 variant ?: "outline" | "ghost" ;
2420 className ?: string ;
@@ -29,15 +25,14 @@ export const MessageCopyButton = memo(function MessageCopyButton({
2925 ...( onCopy ? { onCopy : ( ) => onCopy ( ) } : { } ) ,
3026 ...( onError ? { onError : ( error : Error ) => onError ( error ) } : { } ) ,
3127 } ) ;
32- const buttonTitle = disabled ? ( disabledTitle ?? title ) : isCopied ? "Copied" : title ;
28+ const buttonTitle = isCopied ? "Copied" : title ;
3329
3430 return (
3531 < Button
3632 type = "button"
3733 size = { size }
3834 variant = { variant }
3935 className = { cn ( className ) }
40- disabled = { disabled }
4136 onClick = { ( ) => copyToClipboard ( text , undefined ) }
4237 title = { buttonTitle }
4338 aria-label = { buttonTitle }
You can’t perform that action at this time.
0 commit comments