Compare commits

..

1 Commits

Author SHA1 Message Date
Treycos
d48235c125 Convert TableRowCell to Typescript
(cherry picked from commit 7ea1301221793ded0f64258d48294d20451422f2)
2024-08-27 04:50:41 +00:00
3 changed files with 12 additions and 46 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} />;
}

View File

@@ -18,17 +18,12 @@
.leftButtons,
.rightButtons {
display: flex;
flex: 1 0 50%;
flex-wrap: wrap;
min-width: 0;
}
.leftButtons {
flex: 0 1 auto;
}
.rightButtons {
justify-content: flex-end;
flex: 1 1 50%;
}
.importMode,
@@ -36,7 +31,6 @@
composes: select from '~Components/Form/SelectInput.css';
margin-right: 10px;
max-width: 100%;
width: auto;
}
@@ -49,12 +43,10 @@
.leftButtons,
.rightButtons {
flex-direction: column;
gap: 3px;
}
.leftButtons {
align-items: flex-start;
max-width: fit-content;
}
.rightButtons {