refactor(client): migrating ActionRow.js to TypeScript (#43490)

This commit is contained in:
Nicole Aldurien
2021-09-21 04:13:54 -04:00
committed by GitHub
parent 2949fb0d53
commit cc1b945fab
2 changed files with 10 additions and 12 deletions

View File

@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { ReflexContainer, ReflexSplitter, ReflexElement } from 'react-reflex';
import envData from '../../../../../config/env.json';
import ActionRow from './ActionRow';
import EditorTabs from './EditorTabs';
import ActionRow from './action-row.tsx';
const { showUpcomingChanges } = envData;

View File

@ -1,16 +1,15 @@
import PropTypes from 'prop-types';
import React from 'react';
import BreadCrumb from '../components/bread-crumb';
import EditorTabs from './EditorTabs';
const propTypes = {
block: PropTypes.string,
showConsole: PropTypes.bool,
showNotes: PropTypes.bool,
showPreview: PropTypes.bool,
superBlock: PropTypes.string,
switchDisplayTab: PropTypes.func
};
interface ActionRowProps {
block: string;
showConsole: boolean;
showNotes: boolean;
showPreview: boolean;
superBlock: string;
switchDisplayTab: (displayTab: string) => void;
}
const ActionRow = ({
switchDisplayTab,
@ -18,7 +17,7 @@ const ActionRow = ({
showConsole,
superBlock,
block
}) => {
}: ActionRowProps): JSX.Element => {
const restartStep = () => {
console.log('restart');
};
@ -57,6 +56,5 @@ const ActionRow = ({
);
};
ActionRow.propTypes = propTypes;
ActionRow.displayName = 'ActionRow';
export default ActionRow;