gecko-dev/devtools/client/shared/react-utils.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
840 B
JavaScript
Raw Permalink Normal View History

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// Make this available to both AMD and CJS environments
define(function (require, exports, module) {
// Dependencies
const React = require("resource://devtools/client/shared/vendor/react.js");
/**
* Create React factories for given arguments.
* Example:
* const {
* Tabs,
* TabPanel
Bug 1402394 CamelCase all React component files in \devtools\client\shared\components\. r=pbro MozReview-Commit-ID: HH4mbqB6RTK --HG-- rename : devtools/client/shared/components/autocomplete-popup.js => devtools/client/shared/components/AutoCompletePopup.js rename : devtools/client/shared/components/frame.js => devtools/client/shared/components/Frame.js rename : devtools/client/shared/components/h-split-box.js => devtools/client/shared/components/HSplitBox.js rename : devtools/client/shared/components/notification-box.css => devtools/client/shared/components/NotificationBox.css rename : devtools/client/shared/components/notification-box.js => devtools/client/shared/components/NotificationBox.js rename : devtools/client/shared/components/search-box.js => devtools/client/shared/components/SearchBox.js rename : devtools/client/shared/components/sidebar-toggle.css => devtools/client/shared/components/SidebarToggle.css rename : devtools/client/shared/components/sidebar-toggle.js => devtools/client/shared/components/SidebarToggle.js rename : devtools/client/shared/components/stack-trace.js => devtools/client/shared/components/StackTrace.js rename : devtools/client/shared/components/tree.js => devtools/client/shared/components/Tree.js rename : devtools/client/shared/components/splitter/draggable.js => devtools/client/shared/components/splitter/Draggable.js rename : devtools/client/shared/components/splitter/split-box.css => devtools/client/shared/components/splitter/SplitBox.css rename : devtools/client/shared/components/splitter/split-box.js => devtools/client/shared/components/splitter/SplitBox.js rename : devtools/client/shared/components/tabs/tabbar.css => devtools/client/shared/components/tabs/TabBar.css rename : devtools/client/shared/components/tabs/tabbar.js => devtools/client/shared/components/tabs/TabBar.js rename : devtools/client/shared/components/tabs/tabs.css => devtools/client/shared/components/tabs/Tabs.css rename : devtools/client/shared/components/tabs/tabs.js => devtools/client/shared/components/tabs/Tabs.js rename : devtools/client/shared/components/tree/label-cell.js => devtools/client/shared/components/tree/LabelCell.js rename : devtools/client/shared/components/tree/object-provider.js => devtools/client/shared/components/tree/ObjectProvider.js rename : devtools/client/shared/components/tree/tree-cell.js => devtools/client/shared/components/tree/TreeCell.js rename : devtools/client/shared/components/tree/tree-header.js => devtools/client/shared/components/tree/TreeHeader.js rename : devtools/client/shared/components/tree/tree-row.js => devtools/client/shared/components/tree/TreeRow.js rename : devtools/client/shared/components/tree/tree-view.css => devtools/client/shared/components/tree/TreeView.css rename : devtools/client/shared/components/tree/tree-view.js => devtools/client/shared/components/tree/TreeView.js extra : rebase_source : 5ef89b4169dda156a8160d4d21655147f4d9da11
2017-09-27 05:12:13 +00:00
* } = createFactories(require("devtools/client/shared/components/tabs/Tabs"));
*/
function createFactories(args) {
const result = {};
for (const p in args) {
result[p] = React.createFactory(args[p]);
}
return result;
}
module.exports = {
createFactories,
};
});