Skip to content

Commit f42c65c

Browse files
committed
chore(docs): Updated documentation site for new HoverModeProvider documentation
1 parent 357f2bf commit f42c65c

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

packages/documentation/src/components/Demos/Tooltip/HoverMode.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ and the initial hover delay will be used again. This feature is actually enabled
55
throughout the app but disabled for these demos to help show the default tooltip
66
behavior.
77

8-
To hook into the hover mode, all you need to do is use the
9-
`TooltipHoverModeConfig` component as a parent of all the elements that have
10-
tooltips. The component can either be at the root of your app, or a small
11-
section so that only a few tooltips are "linked together" with this hover mode
12-
flow.
8+
To hook into the hover mode, all you need to do is use the `HoverModeProvider`
9+
component from #utils as a parent of all the elements that have tooltips. The
10+
component can either be at the root of your app, or a small section so that only
11+
a few tooltips are "linked together" with this hover mode flow.

packages/documentation/src/components/Demos/Tooltip/HoverMode.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React, { ReactElement } from "react";
2-
import { TooltipHoverModeConfig, Tooltipped } from "@react-md/tooltip";
2+
import { Tooltipped } from "@react-md/tooltip";
33
import { Button } from "@react-md/button";
4+
import { HoverModeProvider } from "@react-md/utils";
45

56
import Container from "./Container";
67

78
export default function HoverMode(): ReactElement {
89
return (
9-
<TooltipHoverModeConfig>
10+
<HoverModeProvider>
1011
<Container>
1112
{Array.from({ length: 8 }).map((_, i) => (
1213
<Tooltipped
@@ -18,6 +19,6 @@ export default function HoverMode(): ReactElement {
1819
</Tooltipped>
1920
))}
2021
</Container>
21-
</TooltipHoverModeConfig>
22+
</HoverModeProvider>
2223
);
2324
}

packages/documentation/src/components/Demos/Tooltip/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { ReactElement } from "react";
2-
import { TooltipHoverModeConfig } from "@react-md/tooltip";
2+
import { HoverModeProvider } from "@react-md/utils";
33

44
import DemoPage from "../DemoPage";
55

@@ -69,9 +69,7 @@ const demos = [
6969
...demo,
7070
// remove the global tooltip hover mode config from all demos since it'll
7171
// manually be applied in a specific demo instead
72-
children: (
73-
<TooltipHoverModeConfig enabled={false}>{children}</TooltipHoverModeConfig>
74-
),
72+
children: <HoverModeProvider disabled>{children}</HoverModeProvider>,
7573
}));
7674

7775
export default function Tooltip(): ReactElement {

packages/documentation/src/guides/configuring-your-layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ This component will initialize:
4848

4949
- `AppSizeListener` - see #utils
5050
- `InteractionModeListener` - see #utils
51+
- `HoverModeProvider` - see #utils
5152
- `StatesConfig` - see #states
5253
- `NestedDialogContextProvider` - see #dialog
53-
- `TooltipHoverModeConfig` - see #tooltip
5454

5555
The three most important Providers that are included are the `AppSizeListener`,
5656
`InteractionModeListener` and `StatesConfig`. The `AppSizeListener` is in the

0 commit comments

Comments
 (0)