Introduce NUX element
Summary:
allow-large-files
This diff introces the `NUX` element that can be wrapped around any other element to give a first-time usage hint.
Hint dismissal is stored by taking a hash of the hint contents, and scoped per plugin.
Users can reset the 'read' status in the settings page
Example usage:
```
<NUX
title="Use bookmarks to directly navigate to a location in the app."
placement="right">
<Input addonAfter={<SettingOutlined />} defaultValue="mysite" />
</NUX>
```
Reviewed By: nikoant
Differential Revision: D24622276
fbshipit-source-id: 0265634f9ab50c32214b74f033f59482cd986f23
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b8b9c4296a
commit
2b0e93a063
@@ -34,6 +34,7 @@ import {PopoverProvider} from './ui/components/PopoverProvider';
|
||||
import {initializeFlipperLibImplementation} from './utils/flipperLibImplementation';
|
||||
import {enableConsoleHook} from './chrome/ConsoleLogs';
|
||||
import {sideEffect} from './utils/sideEffect';
|
||||
import {NuxManagerContext, createNuxManager} from 'flipper-plugin';
|
||||
|
||||
if (process.env.NODE_ENV === 'development' && os.platform() === 'darwin') {
|
||||
// By default Node.JS has its internal certificate storage and doesn't use
|
||||
@@ -56,7 +57,9 @@ const AppFrame = () => (
|
||||
<ContextMenuProvider>
|
||||
<Provider store={store}>
|
||||
<CacheProvider value={cache}>
|
||||
<App logger={logger} />
|
||||
<NuxManagerContext.Provider value={createNuxManager()}>
|
||||
<App logger={logger} />
|
||||
</NuxManagerContext.Provider>
|
||||
</CacheProvider>
|
||||
</Provider>
|
||||
</ContextMenuProvider>
|
||||
|
||||
Reference in New Issue
Block a user