fixed outside click on alert popup

This commit is contained in:
anovazzi1 2023-05-02 19:54:05 -03:00
commit 7f993ea908

View file

@ -22,17 +22,17 @@ export default function TabsManagerComponent() {
const { flows, addFlow, tabIndex, setTabIndex, uploadFlow, downloadFlow } =
useContext(TabsContext);
const { openPopUp } = useContext(PopUpContext);
const {templates} = useContext(typesContext)
const { templates } = useContext(typesContext);
const AlertWidth = 256;
const { dark, setDark } = useContext(darkContext);
const { notificationCenter, setNotificationCenter } =
useContext(alertContext);
useEffect(() => {
//create the first flow
if (flows.length === 0&& Object.keys(templates).length>0) {
if (flows.length === 0 && Object.keys(templates).length > 0) {
addFlow();
}
}, [addFlow, flows.length,templates]);
}, [addFlow, flows.length, templates]);
return (
<div className="h-full w-full flex flex-col">
@ -87,12 +87,17 @@ export default function TabsManagerComponent() {
const left = (event.target as Element).getBoundingClientRect()
.left;
openPopUp(
<>
<div
className="z-10 absolute"
style={{ top: top + 20, left: left - AlertWidth }}
>
<AlertDropdown />
</div>
<div className="h-screen w-screen fixed top-0 left-0">
</div>
</>
);
}}
>