aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegumin <megumin.bakaretsurie@gmail.com>2022-11-05 09:02:29 +0000
committerGitHub <noreply@github.com>2022-11-05 10:02:29 +0100
commit0cb24cad7ea6e71e161f0fca36ba38a4049ab59b (patch)
tree49c35ce3165fb81a7d4c68aa7fa366d75b68736d /src
parent65620f4976ad88967a8b64792fed5b0667f8e487 (diff)
downloadVencord-0cb24cad7ea6e71e161f0fca36ba38a4049ab59b.tar.gz
Vencord-0cb24cad7ea6e71e161f0fca36ba38a4049ab59b.tar.bz2
Vencord-0cb24cad7ea6e71e161f0fca36ba38a4049ab59b.zip
feat: make text selectable in PatchHelper (#188)
* feat: make text selectable in PatchHelper * real div moment
Diffstat (limited to 'src')
-rw-r--r--src/components/PatchHelper.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/PatchHelper.tsx b/src/components/PatchHelper.tsx
index 6ce093f..f32201a 100644
--- a/src/components/PatchHelper.tsx
+++ b/src/components/PatchHelper.tsx
@@ -85,8 +85,8 @@ function ReplacementComponent({ module, match, replacement, setReplacementError
return (
<>
- {Parser.parse(fullMatch)}
- {Parser.parse(groups)}
+ <div style={{ userSelect: "text" }}>{Parser.parse(fullMatch)}</div>
+ <div style={{ userSelect: "text" }}>{Parser.parse(groups)}</div>
</>
);
}
@@ -94,7 +94,7 @@ function ReplacementComponent({ module, match, replacement, setReplacementError
function renderDiff() {
return diff?.map(p => {
const color = p.added ? "lime" : p.removed ? "red" : "grey";
- return <span style={{ color }}>{p.value}</span>;
+ return <div style={{ color, userSelect: "text" }}>{p.value}</div>;
});
}
@@ -284,7 +284,7 @@ function PatchHelper() {
{!!(find && match && replacement) && (
<>
<Forms.FormTitle className={Margins.marginTop20}>Code</Forms.FormTitle>
- {Parser.parse(makeCodeblock(code, "ts"))}
+ <div style={{ userSelect: "text" }}>{Parser.parse(makeCodeblock(code, "ts"))}</div>
<Button onClick={() => Clipboard.copy(code)}>Copy to Clipboard</Button>
</>
)}