mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-19 19:37:01 -04:00
Shiki settings preview (#297)
This commit is contained in:
parent
49b45d8262
commit
2d08dd8a9c
6 changed files with 48 additions and 6 deletions
|
@ -21,6 +21,7 @@ import { parseUrl } from "@utils/misc";
|
|||
import { wordsFromPascal, wordsToTitle } from "@utils/text";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
import previewExampleText from "~fileContent/previewExample.tsx";
|
||||
import cssText from "~fileContent/style.css";
|
||||
|
||||
import { Settings } from "../../Vencord";
|
||||
|
@ -59,6 +60,12 @@ export default definePlugin({
|
|||
shiki.destroy();
|
||||
clearStyles();
|
||||
},
|
||||
settingsAboutComponent: ({ tempSettings }) => createHighlighter({
|
||||
lang: "tsx",
|
||||
content: previewExampleText,
|
||||
isPreview: true,
|
||||
tempSettings,
|
||||
}),
|
||||
options: {
|
||||
theme: {
|
||||
type: OptionType.SELECT,
|
||||
|
@ -137,7 +144,10 @@ export default definePlugin({
|
|||
description: "Background opacity",
|
||||
markers: [0, 20, 40, 60, 80, 100],
|
||||
default: 100,
|
||||
stickToMarkers: false,
|
||||
componentProps: {
|
||||
stickToMarkers: false,
|
||||
onValueRender: null, // Defaults to percentage
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue