synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
104 lines (103 loc) • 2.7 kB
JavaScript
import { jsx as e, Fragment as x, jsxs as o } from "react/jsx-runtime";
import { Stack as i, Typography as n } from "@mui/material";
import { IconSvgButton as d } from "../IconSvgButton.js";
import h from "../UserOrTeamBadge/UserOrTeamBadge.js";
import { PermissionLevelMenu as f } from "./PermissionLevelMenu.js";
import { ReadOnlyPermissionLevel as g } from "./ReadOnlyPermissionLevel.js";
const v = "Remove from AR Permissions";
function P(s) {
const {
resourceAccess: r,
availablePermissionLevels: t,
canChangePermission: c,
showDeleteButton: a,
onChange: l,
onRemove: p,
displayedPermissionLevelOverride: m
} = s;
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ o(
i,
{
direction: "row",
role: "row",
sx: {
justifyContent: "space-between",
alignItems: "center",
gap: "10px",
py: "6px"
},
children: [
/* @__PURE__ */ e(
n,
{
sx: {
fontSize: "16px",
lineHeight: "20px"
},
children: /* @__PURE__ */ e(
h,
{
principalId: r.principalId,
openLinkInNewTab: !0
}
)
}
),
/* @__PURE__ */ o(
i,
{
direction: "row",
sx: {
gap: "10px",
alignItems: "center",
width: "200px",
flexShrink: 0
},
children: [
c ? /* @__PURE__ */ e(
f,
{
currentAccessType: r.accessType,
availablePermissionLevels: t,
onChange: l
}
) : /* @__PURE__ */ e(
n,
{
variant: "smallText1",
sx: {
flexGrow: 1
},
children: m ?? /* @__PURE__ */ e(
g,
{
accessType: r.accessType
}
)
}
),
a && /* @__PURE__ */ e(
d,
{
"aria-label": v,
onClick: () => p(),
icon: "delete",
sx: {
"&:hover": {
color: "error.main"
}
}
}
)
]
}
)
]
}
) });
}
export {
v as REMOVE_BUTTON_LABEL,
P as ResourceAccessItem
};
//# sourceMappingURL=ResourceAccessItem.js.map