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 ContextMenu from '../ContextMenu';
|
||||||
import Tooltip from '../Tooltip';
|
import Tooltip from '../Tooltip';
|
||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import DataPreview from './DataPreview.js';
|
|
||||||
import createPaste from '../../../fb-stubs/createPaste';
|
import createPaste from '../../../fb-stubs/createPaste';
|
||||||
import {reportInteraction} from '../../../utils/InteractionTracker';
|
import {reportInteraction} from '../../../utils/InteractionTracker';
|
||||||
|
import DataPreview from './DataPreview';
|
||||||
import {getSortedKeys} from './utils.js';
|
import {getSortedKeys} from './utils.js';
|
||||||
import {colors} from '../colors';
|
import {colors} from '../colors';
|
||||||
import {clipboard} from 'electron';
|
import {clipboard} from 'electron';
|
||||||
@@ -574,7 +574,6 @@ export default class DataInspector extends Component<DataInspectorProps> {
|
|||||||
<DataPreview
|
<DataPreview
|
||||||
type={type}
|
type={type}
|
||||||
value={value}
|
value={value}
|
||||||
setValue={setValue}
|
|
||||||
extractValue={this.extractValue}
|
extractValue={this.extractValue}
|
||||||
depth={depth}
|
depth={depth}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {DataValueExtractor} from './DataInspector.tsx';
|
import {DataValueExtractor, InspectorName} from './DataInspector';
|
||||||
import DataDescription from './DataDescription.js';
|
import DataDescription from './DataDescription.js';
|
||||||
import {InspectorName} from './DataInspector.tsx';
|
|
||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import {getSortedKeys} from './utils.js';
|
import {getSortedKeys} from './utils.js';
|
||||||
import {PureComponent} from 'react';
|
import {PureComponent} from 'react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
const PreviewContainer = styled('span')({
|
const PreviewContainer = styled('span')({
|
||||||
fontStyle: 'italic',
|
fontStyle: 'italic',
|
||||||
@@ -30,11 +30,11 @@ function intersperse(arr, sep) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default class DataPreview extends PureComponent<{
|
export default class DataPreview extends PureComponent<{
|
||||||
type: string,
|
type: string;
|
||||||
value: any,
|
value: any;
|
||||||
depth: number,
|
depth: number;
|
||||||
extractValue: DataValueExtractor,
|
extractValue: DataValueExtractor;
|
||||||
maxProperties: number,
|
maxProperties: number;
|
||||||
}> {
|
}> {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
maxProperties: 5,
|
maxProperties: 5,
|
||||||
Reference in New Issue
Block a user