From 739eff34d247da614792d6d6027e7a604ff54bcc Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 24 Oct 2024 17:50:46 +0200 Subject: [PATCH] fix typing of react-json-view-lite --- .../src/theme/DebugJsonView/index.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugJsonView/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugJsonView/index.tsx index c4b28aab80b1..e6aca952d09a 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugJsonView/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugJsonView/index.tsx @@ -6,11 +6,17 @@ */ import React from 'react'; -import {JsonView} from 'react-json-view-lite'; +import { + JsonView, + defaultStyles, + type Props as JsonViewProps, +} from 'react-json-view-lite'; import type {Props} from '@theme/DebugJsonView'; import styles from './styles.module.css'; -const paraisoStyles = { +const paraisoStyles: JsonViewProps['style'] = { + clickableLabel: defaultStyles.clickableLabel, + noQuotesForStringValues: false, container: styles.containerParaiso!, basicChildStyle: styles.basicElementParaiso!, label: styles.labelParaiso!, @@ -24,7 +30,7 @@ const paraisoStyles = { collapseIcon: styles.collapseIconParaiso!, expandIcon: styles.expandIconParaiso!, collapsedContent: styles.collapseContentParaiso!, -}; +} satisfies Partial as JsonViewProps['style']; export default function DebugJsonView({ src,