We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d1e8de commit f734740Copy full SHA for f734740
apps/frontend/src/shared/model/usePopover.ts
@@ -15,6 +15,7 @@ export interface PopoverContextType {
15
placement: Placement;
16
offset: Offset;
17
align: Alignment;
18
+ close: () => void;
19
}
20
21
export const PopoverContext = createContext<PopoverContextType | null>(null);
apps/frontend/src/shared/ui/Popover/index.tsx
@@ -29,6 +29,8 @@ function Popover({
29
y: offset.y ?? 0,
30
};
31
32
+ const close = () => setOpen(false);
33
+
34
return (
35
<PopoverContext.Provider
36
value={{
@@ -38,6 +40,7 @@ function Popover({
38
40
placement,
39
41
offset: fullOffset,
42
align,
43
+ close,
44
}}
45
>
46
{children}
0 commit comments