From e8e50bebcff3db99e73e2c8efc66bf7d1e69406c Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Mon, 11 Sep 2023 12:33:14 +0500 Subject: [PATCH] theme: support code-block css in builder --- .../src/components/theme-builder/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/theme-builder/src/components/theme-builder/index.tsx b/apps/theme-builder/src/components/theme-builder/index.tsx index 08bfa85d4..3f22a9f27 100644 --- a/apps/theme-builder/src/components/theme-builder/index.tsx +++ b/apps/theme-builder/src/components/theme-builder/index.tsx @@ -45,14 +45,15 @@ const JSON_SCHEMA_URL = "https://raw.githubusercontent.com/streetwriters/notesnook-themes/main/schemas/v1.schema.json"; const ThemeInfoTemplate: Omit< ThemeDefinition, - "authors" | "compatibilityVersion" | "colorScheme" | "codeBlockCSS" | "scopes" + "authors" | "compatibilityVersion" | "colorScheme" | "scopes" > = { name: "", id: "", version: 0, license: "", homepage: "", - description: "" + description: "", + codeBlockCSS: "https://github.com/PrismJS/prism-themes/tree/master/themes" }; export default function ThemeBuilder() { @@ -303,7 +304,7 @@ export default function ThemeBuilder() { paddingX: "10px" }} > - {Object.keys(ThemeInfoTemplate).map((key) => { + {Object.keys(ThemeInfoTemplate).map((key: string) => { return ( - {authors.map((author, index) => ( + {authors.map((author, index: number) => (