diff --git a/src/fb-stubs/LayoutInspectorSidebarExtensions.js b/src/fb-stubs/LayoutInspectorSidebarExtensions.js new file mode 100644 index 000000000..1bbba7a49 --- /dev/null +++ b/src/fb-stubs/LayoutInspectorSidebarExtensions.js @@ -0,0 +1,7 @@ +/** + * Copyright 2018-present Facebook. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * @format + */ +export default []; diff --git a/src/ui/components/elements-inspector/sidebar.js b/src/ui/components/elements-inspector/sidebar.js index f6fc618c5..d39e1e307 100644 --- a/src/ui/components/elements-inspector/sidebar.js +++ b/src/ui/components/elements-inspector/sidebar.js @@ -12,6 +12,7 @@ import ManagedDataInspector from '../data-inspector/ManagedDataInspector.js'; import {Component} from 'react'; import {Console} from '../console'; import {GK} from 'sonar'; +import SidebarExtensions from '../../../fb-stubs/LayoutInspectorSidebarExtensions.js'; const deepEqual = require('deep-equal'); @@ -109,7 +110,10 @@ export class InspectorSidebar extends Component { return null; } - const sections = []; + const sections = SidebarExtensions.map(ext => + ext(this.props.client, element.id), + ); + for (const key in element.data) { sections.push(