|
|
@@ -146,7 +146,7 @@ export const GrantSelector = (props: Props): JSX.Element => {
|
|
|
? (
|
|
|
<span>
|
|
|
{`${userRelatedGrantedGroups[0].name}... `}
|
|
|
- <span className="badge badge-purple">+{userRelatedGrantedGroups.length - 1}</span>
|
|
|
+ <span className="badge bg-primary">+{userRelatedGrantedGroups.length - 1}</span>
|
|
|
</span>
|
|
|
) : userRelatedGrantedGroups[0].name}
|
|
|
</span>
|
|
|
@@ -162,7 +162,12 @@ export const GrantSelector = (props: Props): JSX.Element => {
|
|
|
return (
|
|
|
<div className="grw-grant-selector mb-0" data-testid="grw-grant-selector">
|
|
|
<UncontrolledDropdown direction={openInModal ? 'down' : 'up'} size="sm">
|
|
|
- <DropdownToggle color={dropdownToggleBtnColor} caret className="w-100 d-flex justify-content-between align-items-center" disabled={disabled}>
|
|
|
+ <DropdownToggle
|
|
|
+ color={dropdownToggleBtnColor}
|
|
|
+ caret
|
|
|
+ className="w-100 text-truncate d-flex justify-content-between align-items-center"
|
|
|
+ disabled={disabled}
|
|
|
+ >
|
|
|
{dropdownToggleLabelElm}
|
|
|
</DropdownToggle>
|
|
|
<DropdownMenu container={openInModal ? '' : 'body'}>
|
|
|
@@ -209,13 +214,13 @@ export const GrantSelector = (props: Props): JSX.Element => {
|
|
|
|
|
|
return (
|
|
|
<button
|
|
|
- className={`btn btn-outline-primary w-100 d-flex justify-content-start mb-3 align-items-center p-3 ${activeClass}`}
|
|
|
+ className={`btn btn-outline-primary d-flex justify-content-start mb-3 mx-3 align-items-center p-3 ${activeClass}`}
|
|
|
type="button"
|
|
|
key={group.item._id}
|
|
|
onClick={() => groupListItemClickHandler(group)}
|
|
|
>
|
|
|
- <span className="align-middle"><input type="checkbox" checked={groupIsGranted} /></span>
|
|
|
- <h5 className="d-inline-block ms-3">{group.item.name}</h5>
|
|
|
+ <input type="checkbox" checked={groupIsGranted} />
|
|
|
+ <p className="ms-3 mb-0">{group.item.name}</p>
|
|
|
{group.type === GroupType.externalUserGroup && <span className="ms-2 badge badge-pill badge-info">{group.item.provider}</span>}
|
|
|
{/* TODO: Replace <div className="small">(TBD) List group members</div> */}
|
|
|
</button>
|
|
|
@@ -227,6 +232,18 @@ export const GrantSelector = (props: Props): JSX.Element => {
|
|
|
|
|
|
}, [currentUser?.admin, groupListItemClickHandler, myUserGroups, shouldFetch, t, userRelatedGrantedGroups]);
|
|
|
|
|
|
+ const renderModalCloseButton = useCallback(() => {
|
|
|
+ return (
|
|
|
+ <button
|
|
|
+ type="button"
|
|
|
+ className="btn border-0 text-muted"
|
|
|
+ onClick={() => setIsSelectGroupModalShown(false)}
|
|
|
+ >
|
|
|
+ <span className="material-symbols-outlined">close</span>
|
|
|
+ </button>
|
|
|
+ );
|
|
|
+ }, [setIsSelectGroupModalShown]);
|
|
|
+
|
|
|
return (
|
|
|
<>
|
|
|
{ renderGrantSelector() }
|
|
|
@@ -238,7 +255,7 @@ export const GrantSelector = (props: Props): JSX.Element => {
|
|
|
toggle={() => setIsSelectGroupModalShown(false)}
|
|
|
centered
|
|
|
>
|
|
|
- <ModalHeader tag="h4" toggle={() => setIsSelectGroupModalShown(false)} className="bg-purple text-muted">
|
|
|
+ <ModalHeader tag="p" toggle={() => setIsSelectGroupModalShown(false)} className="fs-5 text-muted fw-bold pb-2" close={renderModalCloseButton()}>
|
|
|
{t('user_group.select_group')}
|
|
|
</ModalHeader>
|
|
|
<ModalBody>
|