PHP Classes

File: client/src/app/stores/ModalStore.ts

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Wallet API and Application   client/src/app/stores/ModalStore.ts   Download  
File: client/src/app/stores/ModalStore.ts
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: 569 bytes
 

Contents

Class file image Download
import {makeAutoObservable} from "mobx"; import {store} from "./store"; // modal content interface Modal { open: boolean body: JSX.Element | null } export default class ModalStore { modal: Modal = { open: false, body: null } constructor() { return makeAutoObservable(this) } openModal = (body: JSX.Element) => { this.modal.open = true; this.modal.body = body } closeModal = () => { this.modal.open = false; this.modal.body = null store.errorsStore.reset() } }