({ prompt })
| 109 | type CopyPromptButtonProps = { prompt: string }; |
| 110 | |
| 111 | const CopyPromptButton: FC<CopyPromptButtonProps> = ({ prompt }) => { |
| 112 | const { copyToClipboard, showCopiedSuccess } = useClipboard(); |
| 113 | return ( |
| 114 | <Button |
| 115 | disabled={showCopiedSuccess} |
| 116 | onClick={() => copyToClipboard(prompt)} |
| 117 | size="sm" |
| 118 | variant="outline" |
| 119 | className="p-0 min-w-0 w-full" |
| 120 | > |
| 121 | {showCopiedSuccess ? ( |
| 122 | <> |
| 123 | <CheckIcon /> Copied! |
| 124 | </> |
| 125 | ) : ( |
| 126 | <> |
| 127 | <CopyIcon /> Copy |
| 128 | </> |
| 129 | )} |
| 130 | </Button> |
| 131 | ); |
| 132 | }; |
nothing calls this directly
no test coverage detected