From 0f7721ef117e973d0866e74473c92828a4f82f52 Mon Sep 17 00:00:00 2001 From: Treycos <19551067+Treycos@users.noreply.github.com> Date: Tue, 27 Aug 2024 06:41:30 +0200 Subject: [PATCH] Convert TableRowCell to Typescript (cherry picked from commit 7ea1301221793ded0f64258d48294d20451422f2) Closes #10366 --- .../Components/Table/Cells/TableRowCell.js | 37 ------------------- .../Components/Table/Cells/TableRowCell.tsx | 11 ++++++ 2 files changed, 11 insertions(+), 37 deletions(-) delete mode 100644 frontend/src/Components/Table/Cells/TableRowCell.js create mode 100644 frontend/src/Components/Table/Cells/TableRowCell.tsx diff --git a/frontend/src/Components/Table/Cells/TableRowCell.js b/frontend/src/Components/Table/Cells/TableRowCell.js deleted file mode 100644 index f66bbf3aa..000000000 --- a/frontend/src/Components/Table/Cells/TableRowCell.js +++ /dev/null @@ -1,37 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import styles from './TableRowCell.css'; - -class TableRowCell extends Component { - - // - // Render - - render() { - const { - className, - children, - ...otherProps - } = this.props; - - return ( - - {children} - - ); - } -} - -TableRowCell.propTypes = { - className: PropTypes.string.isRequired, - children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]) -}; - -TableRowCell.defaultProps = { - className: styles.cell -}; - -export default TableRowCell; diff --git a/frontend/src/Components/Table/Cells/TableRowCell.tsx b/frontend/src/Components/Table/Cells/TableRowCell.tsx new file mode 100644 index 000000000..00b6acb1d --- /dev/null +++ b/frontend/src/Components/Table/Cells/TableRowCell.tsx @@ -0,0 +1,11 @@ +import React, { ComponentPropsWithoutRef } from 'react'; +import styles from './TableRowCell.css'; + +export interface TableRowCellProps extends ComponentPropsWithoutRef<'td'> {} + +export default function TableRowCell({ + className = styles.cell, + ...tdProps +}: TableRowCellProps) { + return ; +}