Skip to content

Commit

Permalink
fix typing of react-json-view-lite
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 24, 2024
1 parent 7fd39ce commit 739eff3
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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!,
Expand All @@ -24,7 +30,7 @@ const paraisoStyles = {
collapseIcon: styles.collapseIconParaiso!,
expandIcon: styles.expandIconParaiso!,
collapsedContent: styles.collapseContentParaiso!,
};
} satisfies Partial<JsonViewProps['style']> as JsonViewProps['style'];

export default function DebugJsonView({
src,
Expand Down

0 comments on commit 739eff3

Please sign in to comment.