Introduce PluginRenderer to render plugins
Summary: PluginContainer will now wrap Sandy plugins in PluginRenderer. PluginRenderer will also be used by plugin unit tests in the future Reviewed By: jknoxville Differential Revision: D22159359 fbshipit-source-id: 69f9c8f4bec9392022c1d7a14957f5aca0339d97
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ba01fa5bc9
commit
f2c39aed55
23
desktop/flipper-plugin/src/plugin/PluginContext.tsx
Normal file
23
desktop/flipper-plugin/src/plugin/PluginContext.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {createContext} from 'react';
|
||||
|
||||
export type SandyPluginContext = {
|
||||
deactivate(): void;
|
||||
};
|
||||
|
||||
// TODO: to be filled in later with testing and such
|
||||
const stubPluginContext: SandyPluginContext = {
|
||||
deactivate() {},
|
||||
};
|
||||
|
||||
export const SandyPluginContext = createContext<SandyPluginContext>(
|
||||
stubPluginContext,
|
||||
);
|
||||
Reference in New Issue
Block a user