UX: Make possibly copy-relevant text in settings copyable

This commit is contained in:
Vendicated 2023-04-08 23:28:12 +02:00
parent acc874c34f
commit 840da146b9
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
6 changed files with 31 additions and 11 deletions

View file

@ -186,9 +186,10 @@ function ReplacementInput({ replacement, setReplacement, replacementError }) {
error={error ?? replacementError}
/>
{!isFunc && (
<>
<div className="vc-text-selectable">
<Forms.FormTitle>Cheat Sheet</Forms.FormTitle>
{Object.entries({
"\\i": "Special regex escape sequence that matches identifiers (varnames, classnames, etc.)",
"$$": "Insert a $",
"$&": "Insert the entire match",
"$`\u200b": "Insert the substring before the match",
@ -200,7 +201,7 @@ function ReplacementInput({ replacement, setReplacement, replacementError }) {
{Parser.parse("`" + placeholder + "`")}: {desc}
</Forms.FormText>
))}
</>
</div>
)}
<Switch