aboutsummaryrefslogtreecommitdiff
path: root/src/components/PatchHelper.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/PatchHelper.tsx')
-rw-r--r--src/components/PatchHelper.tsx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/PatchHelper.tsx b/src/components/PatchHelper.tsx
index cb60980..6524528 100644
--- a/src/components/PatchHelper.tsx
+++ b/src/components/PatchHelper.tsx
@@ -17,10 +17,11 @@
*/
import { debounce } from "@utils/debounce";
+import { Margins } from "@utils/margins";
import { makeCodeblock } from "@utils/misc";
import { canonicalizeMatch, canonicalizeReplace, ReplaceFn } from "@utils/patches";
import { search } from "@webpack";
-import { Button, Clipboard, Forms, Margins, Parser, React, Switch, Text, TextInput } from "@webpack/common";
+import { Button, Clipboard, Forms, Parser, React, Switch, Text, TextInput } from "@webpack/common";
import { CheckedTextInput } from "./CheckedTextInput";
import ErrorBoundary from "./ErrorBoundary";
@@ -128,7 +129,7 @@ function ReplacementComponent({ module, match, replacement, setReplacementError
)}
{!!diff?.length && (
- <Button className={Margins.marginTop20} onClick={() => {
+ <Button className={Margins.top20} onClick={() => {
try {
Function(patchedCode.replace(/^function\(/, "function patchedModule("));
setCompileResult([true, "Compiled successfully"]);
@@ -202,7 +203,7 @@ function ReplacementInput({ replacement, setReplacement, replacementError }) {
)}
<Switch
- className={Margins.marginTop8}
+ className={Margins.top8}
value={isFunc}
onChange={setIsFunc}
note="'replacement' will be evaled if this is toggled"
@@ -256,7 +257,7 @@ function PatchHelper() {
return (
<Forms.FormSection>
- <Text variant="heading-md/normal" tag="h2" className={Margins.marginBottom8}>Patch Helper</Text>
+ <Text variant="heading-md/normal" tag="h2" className={Margins.bottom8}>Patch Helper</Text>
<Forms.FormTitle>find</Forms.FormTitle>
<TextInput
type="text"
@@ -296,7 +297,7 @@ function PatchHelper() {
{!!(find && match && replacement) && (
<>
- <Forms.FormTitle className={Margins.marginTop20}>Code</Forms.FormTitle>
+ <Forms.FormTitle className={Margins.top20}>Code</Forms.FormTitle>
<div style={{ userSelect: "text" }}>{Parser.parse(makeCodeblock(code, "ts"))}</div>
<Button onClick={() => Clipboard.copy(code)}>Copy to Clipboard</Button>
</>