refactor popUpContext
This commit is contained in:
parent
8ea68be22b
commit
d54da3b878
1 changed files with 19 additions and 18 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
import { createContext } from "react";
|
import { createContext } from "react";
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from "react";
|
||||||
|
|
||||||
|
//context to set JSX element on the DOM
|
||||||
export const PopUpContext = createContext({
|
export const PopUpContext = createContext({
|
||||||
openPopUp: (popUpElement: JSX.Element) => {},
|
openPopUp: (popUpElement: JSX.Element) => {},
|
||||||
closePopUp: () => {}
|
closePopUp: () => {},
|
||||||
});
|
});
|
||||||
|
|
||||||
interface PopUpProviderProps {
|
interface PopUpProviderProps {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue