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,7 +22,7 @@ export default function TabsManagerComponent() {
const { flows, addFlow, tabIndex, setTabIndex, uploadFlow, downloadFlow } = const { flows, addFlow, tabIndex, setTabIndex, uploadFlow, downloadFlow } =
useContext(TabsContext); useContext(TabsContext);
const { openPopUp } = useContext(PopUpContext); const { openPopUp } = useContext(PopUpContext);
const {templates} = useContext(typesContext) const { templates } = useContext(typesContext);
const AlertWidth = 256; const AlertWidth = 256;
const { dark, setDark } = useContext(darkContext); const { dark, setDark } = useContext(darkContext);
const { notificationCenter, setNotificationCenter } = const { notificationCenter, setNotificationCenter } =
@ -87,12 +87,17 @@ export default function TabsManagerComponent() {
const left = (event.target as Element).getBoundingClientRect() const left = (event.target as Element).getBoundingClientRect()
.left; .left;
openPopUp( openPopUp(
<>
<div <div
className="z-10 absolute" className="z-10 absolute"
style={{ top: top + 20, left: left - AlertWidth }} style={{ top: top + 20, left: left - AlertWidth }}
> >
<AlertDropdown /> <AlertDropdown />
</div> </div>
<div className="h-screen w-screen fixed top-0 left-0">
</div>
</>
); );
}} }}
> >