mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-07 19:25:13 +02:00
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import * as React from 'react';
|
|
export interface StyleProps {
|
|
container: string;
|
|
basicChildStyle: string;
|
|
label: string;
|
|
nullValue: string;
|
|
undefinedValue: string;
|
|
numberValue: string;
|
|
stringValue: string;
|
|
booleanValue: string;
|
|
otherValue: string;
|
|
punctuation: string;
|
|
expandIcon: string;
|
|
collapseIcon: string;
|
|
collapsedContent: string;
|
|
noQuotesForStringValues: boolean;
|
|
}
|
|
export interface JsonRenderProps<T> {
|
|
field?: string;
|
|
value: T;
|
|
lastElement: boolean;
|
|
level: number;
|
|
style: StyleProps;
|
|
shouldExpandNode: (level: number, value: any, field?: string) => boolean;
|
|
}
|
|
export interface ExpandableRenderProps {
|
|
field?: string;
|
|
value: Array<any> | object;
|
|
data: Array<[string | undefined, any]>;
|
|
openBracket: string;
|
|
closeBracket: string;
|
|
lastElement: boolean;
|
|
level: number;
|
|
style: StyleProps;
|
|
shouldExpandNode: (level: number, value: any, field?: string) => boolean;
|
|
}
|
|
export default function DataRender(props: JsonRenderProps<any>): React.JSX.Element;
|