Skip to content

Commit 4566246

Browse files
committed
docs(core): update docs for useHoverModeProvider around defaultActiveId
1 parent 1c08e01 commit 4566246

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/core/src/hoverMode/useHoverModeProvider.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,15 @@ export interface HoverModeContext extends SimpleHoverModeContext {
111111
*/
112112
export interface CreateHoverModeContextOptions {
113113
/**
114-
* TODO: I think this has something to do with how I implemented the MenuBar.
114+
* This should only be used if creating nested hover mode behavior where the
115+
* hover mode should default to being enabled if a parent element is hovered.
116+
* So set this to an element's `id` if a parent element is being hovered when
117+
* the component **mounts**.
118+
*
119+
* The use case for this is the `MenuBar` component since after clicking a
120+
* menu button or hovering it long enough to enable the hover mode, all child
121+
* menus should also be in the hover mode until the top-most element is
122+
* closed.
115123
*
116124
* @defaultValue `""`
117125
*/

0 commit comments

Comments
 (0)