Line data Source code
1 : import * as React from 'react';
2 : import * as styles from './json_view.module.css';
3 :
4 : export interface EllipsisCompProps<T extends object> {
5 : value?: T;
6 : keyName: string | number;
7 : isExpanded: boolean;
8 : }
9 :
10 1 : export function JsonEllipsisSymbol<T extends object>({ isExpanded, value }: EllipsisCompProps<T>) {
11 1 : if (isExpanded || (typeof value === 'object' && Object.keys(value).length == 0)) {
12 1 : return null;
13 : }
14 1 : return (
15 1 : <span className={styles.symbol_ellipsis}>
16 : ...
17 1 : </span>
18 : );
19 1 : };
|