{name}
{email}
{this.renderMemberRole()}
{showResendButton ? (
{isInviting && (
)}
{isInviteSuccessful && {t('Sent!')}}
{!isInviting && !isInviteSuccessful && (
)}
) : (
{has2fa ? (
) : (
)}
{has2fa ? t('2FA Enabled') : t('2FA Not Enabled')}
)}
{showRemoveButton || showLeaveButton ? (
{showRemoveButton && canRemoveMember && (
}
size="sm"
busy={this.state.busy}
>
{t('Remove')}
)}
{showRemoveButton && !canRemoveMember && (
}
>
{t('Remove')}
)}
{showLeaveButton && memberCanLeave && (
}>
{t('Leave')}
)}
{showLeaveButton && !memberCanLeave && (
}
disabled
title={
isIdpProvisioned
? t(
"Your account is managed through your organization's identity provider."
)
: t(
'You cannot leave this organization as you are the only organization owner.'
)
}
>
{t('Leave')}
)}
) : null}
);
}
}
const StyledPanelItem = styled(PanelItem)`
display: grid;
grid-template-columns: minmax(150px, 4fr) minmax(90px, 2fr) minmax(120px, 2fr) minmax(
100px,
1fr
);
gap: ${space(2)};
align-items: center;
`;
// Force action button at the end to align to right
const RightColumn = styled('div')`
display: flex;
justify-content: flex-end;
`;
const Section = styled('div')`
display: inline-grid;
grid-template-columns: max-content auto;
gap: ${space(1)};
align-items: center;
`;
const MemberHeading = styled(Section)``;
const MemberDescription = styled(Link)`
overflow: hidden;
`;
const UserName = styled('div')`
display: block;
overflow: hidden;
font-size: ${p => p.theme.fontSizeMedium};
text-overflow: ellipsis;
`;
const Email = styled('div')`
color: ${p => p.theme.subText};
font-size: ${p => p.theme.fontSizeSmall};
overflow: hidden;
text-overflow: ellipsis;
`;
const InvitedRole = styled(Section)``;
const LoadingContainer = styled('div')`
margin-top: 0;
margin-bottom: ${space(1.5)};
`;
const AuthStatus = styled(Section)``;