PatchHelper: Add Copy as Codeblock button (#2820)

This commit is contained in:
sadan4 2024-08-31 22:13:22 -04:00 committed by GitHub
parent d5eaae9d51
commit 81eabc7ee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -382,6 +382,7 @@ function PatchHelper() {
<Forms.FormTitle className={Margins.top20}>Code</Forms.FormTitle>
<CodeBlock lang="js" content={code} />
<Button onClick={() => Clipboard.copy(code)}>Copy to Clipboard</Button>
<Button className={Margins.top8} onClick={() => Clipboard.copy("```ts\n" + code + "\n```")}>Copy as Codeblock</Button>
</>
)}
</SettingsTab>