Migrate DataPreview to tsx
Summary: As per title Reviewed By: danielbuechele Differential Revision: D16764969 fbshipit-source-id: 8b8d7f7c92ee99dbbb8b7277e1f38f90da927003
This commit is contained in:
committed by
Facebook Github Bot
parent
9294bf0b82
commit
d84900aa8c
@@ -10,9 +10,9 @@ import {Component} from 'react';
|
||||
import ContextMenu from '../ContextMenu';
|
||||
import Tooltip from '../Tooltip';
|
||||
import styled from 'react-emotion';
|
||||
import DataPreview from './DataPreview.js';
|
||||
import createPaste from '../../../fb-stubs/createPaste';
|
||||
import {reportInteraction} from '../../../utils/InteractionTracker';
|
||||
import DataPreview from './DataPreview';
|
||||
import {getSortedKeys} from './utils.js';
|
||||
import {colors} from '../colors';
|
||||
import {clipboard} from 'electron';
|
||||
@@ -574,7 +574,6 @@ export default class DataInspector extends Component<DataInspectorProps> {
|
||||
<DataPreview
|
||||
type={type}
|
||||
value={value}
|
||||
setValue={setValue}
|
||||
extractValue={this.extractValue}
|
||||
depth={depth}
|
||||
/>
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {DataValueExtractor} from './DataInspector.tsx';
|
||||
import {DataValueExtractor, InspectorName} from './DataInspector';
|
||||
import DataDescription from './DataDescription.js';
|
||||
import {InspectorName} from './DataInspector.tsx';
|
||||
import styled from 'react-emotion';
|
||||
import {getSortedKeys} from './utils.js';
|
||||
import {PureComponent} from 'react';
|
||||
import React from 'react';
|
||||
|
||||
const PreviewContainer = styled('span')({
|
||||
fontStyle: 'italic',
|
||||
@@ -30,11 +30,11 @@ function intersperse(arr, sep) {
|
||||
}
|
||||
|
||||
export default class DataPreview extends PureComponent<{
|
||||
type: string,
|
||||
value: any,
|
||||
depth: number,
|
||||
extractValue: DataValueExtractor,
|
||||
maxProperties: number,
|
||||
type: string;
|
||||
value: any;
|
||||
depth: number;
|
||||
extractValue: DataValueExtractor;
|
||||
maxProperties: number;
|
||||
}> {
|
||||
static defaultProps = {
|
||||
maxProperties: 5,
|
||||
Reference in New Issue
Block a user