mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 15:53:04 -05:00
3b29865d87
[web] Allow read-only invite when over collaborator limit GitOrigin-RevId: 96783910b63aca3f282d7c26a412b56336246c64
25 lines
781 B
JavaScript
25 lines
781 B
JavaScript
import { Row } from 'react-bootstrap'
|
|
import AddCollaborators from './add-collaborators'
|
|
import AddCollaboratorsUpgrade from './add-collaborators-upgrade'
|
|
import CollaboratorsLimitUpgrade from './collaborators-limit-upgrade'
|
|
import PropTypes from 'prop-types'
|
|
|
|
export default function SendInvites({
|
|
canAddCollaborators,
|
|
hasExceededCollaboratorLimit,
|
|
}) {
|
|
return (
|
|
<Row className="invite-controls">
|
|
{hasExceededCollaboratorLimit && <AddCollaboratorsUpgrade />}
|
|
{!canAddCollaborators && !hasExceededCollaboratorLimit && (
|
|
<CollaboratorsLimitUpgrade />
|
|
)}
|
|
<AddCollaborators readOnly={!canAddCollaborators} />
|
|
</Row>
|
|
)
|
|
}
|
|
|
|
SendInvites.propTypes = {
|
|
canAddCollaborators: PropTypes.bool,
|
|
hasExceededCollaboratorLimit: PropTypes.bool,
|
|
}
|