mirror of
https://github.com/Sonarr/Sonarr
synced 2025-01-03 05:35:29 +00:00
Convert TableRowCell to Typescript
This commit is contained in:
parent
f033799d7a
commit
7ea1301221
2 changed files with 11 additions and 37 deletions
|
@ -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;
|
|
11
frontend/src/Components/Table/Cells/TableRowCell.tsx
Normal file
11
frontend/src/Components/Table/Cells/TableRowCell.tsx
Normal 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} />;
|
||||||
|
}
|
Loading…
Reference in a new issue