UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

64 lines (63 loc) 1.84 kB
import { jsxs as i, jsx as e } from "react/jsx-runtime"; import u from "../layout/InfiniteTableLayout.js"; import { Typography as T, Button as f } from "@mui/material"; import { StarTwoTone as x } from "@mui/icons-material"; import { useAccessRequirementTable as b } from "./UseAccessRequirementTable.js"; import C from "../TanStackTable/StyledTanStackTable.js"; import { noop as N } from "lodash-es"; function k(n) { const { nameOrID: a, relatedProjectId: s, reviewerId: c, accessType: l, onCreateNewAccessRequirementClicked: t, typeFilter: m, onTypeFilterChange: p = N } = n, { table: r, isLoading: o, hasNextPage: d, fetchNextPage: h, isFetchingNextPage: y } = b({ nameOrID: a, relatedProjectId: s, reviewerId: c, accessType: l, typeFilter: m, onTypeFilterChange: p }), g = !o && r.getRowModel().rows.length === 0; return /* @__PURE__ */ i("div", { children: [ /* @__PURE__ */ i("div", { className: "SRC-split", children: [ /* @__PURE__ */ e(T, { variant: "headline3", style: { marginBottom: 0 }, children: "Access Requirements" }), t && /* @__PURE__ */ e( f, { variant: "outlined", color: "primary", onClick: t, startIcon: /* @__PURE__ */ e(x, {}), children: "New Access Requirement" } ) ] }), /* @__PURE__ */ e( u, { table: /* @__PURE__ */ e( C, { table: r, styledTableContainerProps: { sx: { my: 2 } } } ), isLoading: o, isEmpty: g, hasNextPage: d, onFetchNextPageClicked: () => { h(); }, isFetchingNextPage: y } ) ] }); } export { k as AccessRequirementTable }; //# sourceMappingURL=AccessRequirementTable.js.map