| object;
data: Array<[string | undefined, any]>;
openBracket: string;
@@ -144,6 +144,25 @@ function ExpandableObject({
);
}
+export interface EmptyRenderProps {
+ field: string | undefined;
+ openBracket: string;
+ closeBracket: string;
+ lastElement: boolean;
+ style: StyleProps;
+}
+
+function EmptyObject({ field, openBracket, closeBracket, lastElement, style }: EmptyRenderProps) {
+ return (
+
+ {field && {field}:}
+ {openBracket}
+ {closeBracket}
+ {!lastElement && ,}
+
+ );
+}
+
function JsonObject({
field,
value,
@@ -153,6 +172,16 @@ function JsonObject({
clickToExpandNode,
level
}: JsonRenderProps