1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-19 17:32:38 +01:00

Convert TableRowCell to Typescript

(cherry picked from commit 7ea1301221793ded0f64258d48294d20451422f2)

Closes #10366
This commit is contained in:
Treycos 2024-08-27 06:41:30 +02:00 committed by Bogdan
parent 89731bdc41
commit 0f7721ef11
2 changed files with 11 additions and 37 deletions

View File

@ -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 (
<td
className={className}
{...otherProps}
>
{children}
</td>
);
}
}
TableRowCell.propTypes = {
className: PropTypes.string.isRequired,
children: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
};
TableRowCell.defaultProps = {
className: styles.cell
};
export default TableRowCell;

View File

@ -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 <td className={className} {...tdProps} />;
}