File tree Expand file tree Collapse file tree
packages/documentation/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,8 +5,7 @@ and the initial hover delay will be used again. This feature is actually enabled
55throughout the app but disabled for these demos to help show the default tooltip
66behavior.
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.
Original file line number Diff line number Diff line change 11import React , { ReactElement } from "react" ;
2- import { TooltipHoverModeConfig , Tooltipped } from "@react-md/tooltip" ;
2+ import { Tooltipped } from "@react-md/tooltip" ;
33import { Button } from "@react-md/button" ;
4+ import { HoverModeProvider } from "@react-md/utils" ;
45
56import Container from "./Container" ;
67
78export 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}
Original file line number Diff line number Diff line change 11import React , { ReactElement } from "react" ;
2- import { TooltipHoverModeConfig } from "@react-md/tooltip " ;
2+ import { HoverModeProvider } from "@react-md/utils " ;
33
44import 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
7775export default function Tooltip ( ) : ReactElement {
Original file line number Diff line number Diff 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
5555The three most important Providers that are included are the ` AppSizeListener ` ,
5656` InteractionModeListener ` and ` StatesConfig ` . The ` AppSizeListener ` is in the
You can’t perform that action at this time.
0 commit comments