Update Tooltip implementation for Flipper

Summary:
Basic tooltips available. Use is:

  <Tooltip
     title="This is what will show up inside the tooltip"
     options={{ // can include any or none of these (if not included default will be used)
        position, // 'above', 'below', 'toRight', or 'toLeft'
        showTail, // whether or not tooltip should have tail
        delay, // how long to wait on hover before showing tooltip
        // supported css properties
        backgroundColor,
        color,
        maxWidth,
        width,
        borderRadius,
        padding,
        lineHeight,
     }}>
     <ElementTooltipWillShowUpFor/>
  </Tooltip>

Reviewed By: danielbuechele

Differential Revision: D9596287

fbshipit-source-id: 233b1ad01b96264bbc1f62f3798e3d69d1ab4bae
This commit is contained in:
Sara Valderrama
2018-09-04 10:32:01 -07:00
committed by Facebook Github Bot
parent cf3cb0d08f
commit d26779cd16
5 changed files with 221 additions and 37 deletions

View File

@@ -21,6 +21,7 @@ import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/autoMergeLevel2';
import reducers from './reducers/index.js';
import dispatcher from './dispatcher/index.js';
import {setupMenuBar} from './MenuBar.js';
import TooltipProvider from './ui/components/TooltipProvider.js';
const path = require('path');
const reducer: typeof reducers = persistReducer(
@@ -52,11 +53,13 @@ GK.init();
setupMenuBar();
const AppFrame = () => (
<ContextMenuProvider>
<Provider store={store}>
<App logger={logger} bugReporter={bugReporter} />
</Provider>
</ContextMenuProvider>
<TooltipProvider>
<ContextMenuProvider>
<Provider store={store}>
<App logger={logger} bugReporter={bugReporter} />
</Provider>
</ContextMenuProvider>
</TooltipProvider>
);
// $FlowFixMe: this element exists!