PHP Classes

File: client/src/features/components/ModalContainer.tsx

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Wallet API and Application   client/src/features/components/ModalContainer.tsx   Download  
File: client/src/features/components/ModalContainer.tsx
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Wallet API and Application
Application to manage a wallet by calling an API
Author: By
Last change:
Date: 2 years ago
Size: 1,051 bytes
 

Contents

Class file image Download
import {Dialog, Transition} from '@headlessui/react' import {observer} from "mobx-react-lite"; import {useStore} from "../../app/stores/store"; import React, {Fragment, useRef} from "react"; function ModalContainer() { const {modalStore} = useStore(); const cancelButtonRef = useRef(null) return ( <Transition.Root show={modalStore.modal.open} as={Fragment}> <Dialog initialFocus={cancelButtonRef} as="div" className="fixed inset-0 z-50 overflow-y-auto flex justify-center items-center" onClose={modalStore.closeModal}> <div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> <Dialog.Overlay className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"/> <div className={'relative flex bg-white mt-52 rounded'}>{modalStore.modal.body}</div> </div> </Dialog> </Transition.Root> ) } export default observer(ModalContainer);