mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-08-02 17:00:05 +02:00

* Remove the Bootstrap 5 version utilities * Remove Account settings LESS stylesheet and unused styles * Prefer using the OLFormText wrapper component instead of FormText * Remove the Bootstrap 3 version stories * Replace Font Awesome icons to Material icons * Fix the heading hierarchy * Cleanup unused translation * Restore ellipsis to the text of two loading spinners * Add loading button tests back and add some button loading labels --------- Co-authored-by: Tim Down <158919+timdown@users.noreply.github.com> GitOrigin-RevId: 283a9167c8c78bf0fe5062840ded6917dcd6263b
30 lines
722 B
TypeScript
30 lines
722 B
TypeScript
import { useState, useCallback } from 'react'
|
|
import LeaveModalContent from './modal-content'
|
|
import OLModal from '@/features/ui/components/ol/ol-modal'
|
|
|
|
type LeaveModalProps = {
|
|
isOpen: boolean
|
|
handleClose: () => void
|
|
}
|
|
|
|
function LeaveModal({ isOpen, handleClose }: LeaveModalProps) {
|
|
const [inFlight, setInFlight] = useState(false)
|
|
|
|
const handleHide = useCallback(() => {
|
|
if (!inFlight) {
|
|
handleClose()
|
|
}
|
|
}, [handleClose, inFlight])
|
|
|
|
return (
|
|
<OLModal animation show={isOpen} onHide={handleHide} id="leave-modal">
|
|
<LeaveModalContent
|
|
handleHide={handleHide}
|
|
inFlight={inFlight}
|
|
setInFlight={setInFlight}
|
|
/>
|
|
</OLModal>
|
|
)
|
|
}
|
|
|
|
export default LeaveModal
|