mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-15 02:30:58 -05:00
4f838ccacf
[web] BS5 share modal GitOrigin-RevId: 40a33e06eab720b568d31aefa021682535b6934e
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
import AddCollaborators from './add-collaborators'
|
|
import AddCollaboratorsUpgrade from './add-collaborators-upgrade'
|
|
import CollaboratorsLimitUpgrade from './collaborators-limit-upgrade'
|
|
import AccessLevelsChanged from './access-levels-changed'
|
|
import PropTypes from 'prop-types'
|
|
import OLRow from '@/features/ui/components/ol/ol-row'
|
|
|
|
export default function SendInvites({
|
|
canAddCollaborators,
|
|
hasExceededCollaboratorLimit,
|
|
haveAnyEditorsBeenDowngraded,
|
|
somePendingEditorsResolved,
|
|
}) {
|
|
return (
|
|
<OLRow className="invite-controls">
|
|
{hasExceededCollaboratorLimit && !haveAnyEditorsBeenDowngraded && (
|
|
<AddCollaboratorsUpgrade />
|
|
)}
|
|
|
|
{haveAnyEditorsBeenDowngraded && (
|
|
<AccessLevelsChanged
|
|
somePendingEditorsResolved={somePendingEditorsResolved}
|
|
/>
|
|
)}
|
|
|
|
{!canAddCollaborators &&
|
|
!hasExceededCollaboratorLimit &&
|
|
!haveAnyEditorsBeenDowngraded && <CollaboratorsLimitUpgrade />}
|
|
<AddCollaborators readOnly={!canAddCollaborators} />
|
|
</OLRow>
|
|
)
|
|
}
|
|
|
|
SendInvites.propTypes = {
|
|
canAddCollaborators: PropTypes.bool,
|
|
hasExceededCollaboratorLimit: PropTypes.bool,
|
|
haveAnyEditorsBeenDowngraded: PropTypes.bool,
|
|
somePendingEditorsResolved: PropTypes.bool,
|
|
}
|