refactor(client): migrating ActionRow.js to TypeScript (#43490)
This commit is contained in:
@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { ReflexContainer, ReflexSplitter, ReflexElement } from 'react-reflex';
|
import { ReflexContainer, ReflexSplitter, ReflexElement } from 'react-reflex';
|
||||||
import envData from '../../../../../config/env.json';
|
import envData from '../../../../../config/env.json';
|
||||||
import ActionRow from './ActionRow';
|
|
||||||
import EditorTabs from './EditorTabs';
|
import EditorTabs from './EditorTabs';
|
||||||
|
import ActionRow from './action-row.tsx';
|
||||||
|
|
||||||
const { showUpcomingChanges } = envData;
|
const { showUpcomingChanges } = envData;
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import BreadCrumb from '../components/bread-crumb';
|
import BreadCrumb from '../components/bread-crumb';
|
||||||
import EditorTabs from './EditorTabs';
|
import EditorTabs from './EditorTabs';
|
||||||
|
|
||||||
const propTypes = {
|
interface ActionRowProps {
|
||||||
block: PropTypes.string,
|
block: string;
|
||||||
showConsole: PropTypes.bool,
|
showConsole: boolean;
|
||||||
showNotes: PropTypes.bool,
|
showNotes: boolean;
|
||||||
showPreview: PropTypes.bool,
|
showPreview: boolean;
|
||||||
superBlock: PropTypes.string,
|
superBlock: string;
|
||||||
switchDisplayTab: PropTypes.func
|
switchDisplayTab: (displayTab: string) => void;
|
||||||
};
|
}
|
||||||
|
|
||||||
const ActionRow = ({
|
const ActionRow = ({
|
||||||
switchDisplayTab,
|
switchDisplayTab,
|
||||||
@ -18,7 +17,7 @@ const ActionRow = ({
|
|||||||
showConsole,
|
showConsole,
|
||||||
superBlock,
|
superBlock,
|
||||||
block
|
block
|
||||||
}) => {
|
}: ActionRowProps): JSX.Element => {
|
||||||
const restartStep = () => {
|
const restartStep = () => {
|
||||||
console.log('restart');
|
console.log('restart');
|
||||||
};
|
};
|
||||||
@ -57,6 +56,5 @@ const ActionRow = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ActionRow.propTypes = propTypes;
|
|
||||||
ActionRow.displayName = 'ActionRow';
|
ActionRow.displayName = 'ActionRow';
|
||||||
export default ActionRow;
|
export default ActionRow;
|
Reference in New Issue
Block a user