Skip to content

Commit

Permalink
props validation added
Browse files Browse the repository at this point in the history
  • Loading branch information
fahad-aot committed Oct 29, 2024
1 parent a9fb129 commit f64af69
Showing 1 changed file with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import Pagination from "react-js-pagination";
import { Dropdown } from "react-bootstrap";
import { HelperServices } from "@formsflow/service";
import { CustomButton, DownArrowIcon } from "@formsflow/components";
export const ReusableTableRow = ({ item, gotoEdit,buttonLabel }) => {
import PropTypes from "prop-types";

export const ReusableTableRow = ({ item, gotoEdit, buttonLabel }) => {
const { t } = useTranslation();
return (
<tr>
Expand Down Expand Up @@ -43,6 +45,17 @@ export const ReusableTableRow = ({ item, gotoEdit,buttonLabel }) => {
</tr>
);
};
ReusableTableRow.propTypes = {
item: PropTypes.shape({
name: PropTypes.string.isRequired,
parentProcessKey: PropTypes.string,
modified: PropTypes.string,
status: PropTypes.string,
_id: PropTypes.string.isRequired,
}).isRequired,
gotoEdit: PropTypes.func.isRequired,
buttonLabel: PropTypes.string.isRequired,
};
export const TableFooter = ({
limit,
activePage,
Expand Down Expand Up @@ -109,3 +122,16 @@ export const TableFooter = ({
</tr>
);
};
TableFooter.propTypes = {
limit: PropTypes.number.isRequired,
activePage: PropTypes.number.isRequired,
totalCount: PropTypes.number.isRequired,
handlePageChange: PropTypes.func.isRequired,
onLimitChange: PropTypes.func.isRequired,
pageOptions: PropTypes.arrayOf(
PropTypes.shape({
value: PropTypes.number.isRequired,
text: PropTypes.string.isRequired,
})
).isRequired,
};

0 comments on commit f64af69

Please sign in to comment.